Image encoding device, image decoding device, image encoding method and image decoding method

ABSTRACT

An encoding device includes a color component separating unit for separating an input bit stream for the respective color components, a block dividing unit for dividing an input color component signal into blocks to generate a signal of an encoding unit area, a predicted image generating unit for generating a predicted image for the signal, a determining unit for determining a prediction mode used for encoding according to a prediction efficiency of the predicted image, a prediction error encoding unit for encoding a difference between the predicted image corresponding to the prediction mode determined by the determining unit and the input color component signal, and an encoding unit for variable length-coding the prediction mode, an output from the prediction error encoding unit, and a color component identification flag indicating the color component to which the input bit stream belongs as a result of the color component separation.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a digital image signal encoding device,a digital image signal decoding device, a digital image signal encodingmethod, and a digital image signal decoding method used for an imagecompression encoding technology or a compressed image data transmissiontechnology.

2. Description of the Related Art

An international standard video encoding system such as MPEG or ITU-T H.26x has conventionally been premised on use of a standardized inputsignal format called a 4:2:0 format. The 4:2:0 format is a format wherea color moving image signal of RGB or the like is converted into aluminance component (Y) and two chrominance components (Cb, Cr), and thenumber of chrominance component samples is reduced to half of luminancecomponents both in horizontal and vertical directions. The chrominancecomponent is inferior to the luminance component in visibility.Accordingly, the conventional international standard video encodingsystem such as the MPEG-4 AVC (ISO/IEC 14496-10)/ITU-T H.264 standard(hereinafter, referred to simply as AVC) (hereinafter, referred to asNon-patent Document 1) has been based on the premise that the amount oforiginal information to be encoded is reduced by downsamplingchrominance components before encoding is executed as mentioned above.On the other hand, with recent increases in resolution and gradation ofa video display and for the purpose of precisely reproducing on thescreen color representation at the time of creating contents of digitalcinema and the like, studies have been made on a system for performingencoding by maintaining the number of samples equal to that of luminancecomponents without downsampling chrominance components. A format wherethe numbers of luminance and chrominance component samples arecompletely equal is called a 4:4:4 format. According to Non-patentDocument 1, a “high 4:4:4: profile” has been developed as an encodingmethod which uses the 4:4:4 format as an input. As a method suited forthis object, there is employed a standard method as defined in the JPEG2000 (ISO/IEC 15444) standard (hereinafter, referred to as Non-patentDocument 2). As illustrated in FIG. 10, the conventional 4:2:0 formathas been limited to Y, Cb, and Cr color space definitions because of thepremise of downsampling of chrominance components. In the case of the4:4:4 format, however, because there is no sample ratio distinctionbetween color components, R, G, and B can be directly used in additionto Y, Cb, and Cr, and a plurality of color space definitions can beused. In a video encoding method using the 4:2:0 format, a color spaceis limited to a Y, Cb, and Cr color space. Therefore, the type of colorspace is not required to be taken into consideration during an encodingprocess. In the AVC high 4:4:4 profile described above, however, colorspace definition affects the encoding process itself. On the other hand,because the current high 4:4:4 profile considers the compatibility withthe other profiles which use the 4:2:0 format defined by the Y, Cb, andCr color space as a target to be encoded, it is not considered that thehigh 4:4:4 profile is designed to optimize a compression efficiency ofthe 4:4:4 format.

For example, in a high 4:2:0 profile encoding the 4:2:0 format of theAVC, in a macroblock area composed of luminance components of 16×16pixels, corresponding chrominance components are 8×8 pixel blocks forboth Cb and Cr. In motion compensation prediction of the high 4:2:0profile, block size information which becomes a unit of motioncompensation prediction only for the luminance components, referenceimage information used for prediction, and motion vector information ofeach block are multiplexed, and motion compensation prediction iscarried out for chrominance components by the same information as thatof the luminance components. The above method is premised on the colorspace definition that the contribution of the chrominance components isless than that of the luminance component which contributes greatly tothe expression of an image structure (texture) in the 4:2:0 format.However, the current high 4:4:4 profile corresponds to the simpleextension of the intra prediction mode for chrominance in the 4:2:0format even when the block size of a chrominance signal per macroblockis expanded to 16×16 pixels. Moreover, as in the case of the 4:2:0format, one component is regarded as the luminance component. After onlyinformation for one component is multiplexed, motion compensationprediction is performed using an inter prediction mode, reference imageinformation, and motion vector information which are common to threecomponents. Therefore, the prediction method is not always optimal forthe 4:4:4 format in which the respective color components equallycontribute to the expression of the structure of an image signal.

SUMMARY OF THE INVENTION

As described by way of the above related art, it is an object of thepresent invention to provide an encoding device, a decoding device, anencoding method, a decoding method, programs for executing thesemethods, and a recording medium recorded with these programs, thatenhance optimality in a case of encoding moving image signals having nosample ratio distinction between color components such as a 4:4:4format.

According to the present invention, there is provided an image decodingdevice for receiving a bit stream obtained by compression-encoding acolor moving image signal composed of a plurality of color components asan input and using motion compensation prediction decoding for each ofthe plurality of color components of the color moving image signal todecode the color moving image signal, comprising: a color componentidentifying unit for decoding a color component identification flag foridentifying the color component to which the input bit stream belongs todetermine the color component whose encoded information is contained inthe bit stream; a decoding unit for decoding, from the bit stream,virtual pixel accuracy indication information indicating an upperaccuracy limit of a virtual pixel used for generating a predicted imagefor each color component determined by the color component identifyingunit and decoding information obtained by encoding a motion compensationprediction mode indicating a motion compensation prediction imagegenerating method used for encoding an encoding unit area, acorresponding motion vector, and a prediction error from the bit streamaccording to a predetermined syntax for each encoding unit area; apredicted image generating unit for generating a predicted image for asignal of the encoding unit area based on the virtual pixel accuracyindication information, the motion compensation prediction mode, and themotion vector; a prediction error decoding unit for decoding aprediction error signal based on the information obtained by encodingthe prediction error for the encoding unit area; and an adder unit foradding an output from the predicted image generating unit and an outputfrom the prediction error decoding unit, wherein the decoding unitperforms a decoding process of the motion vector based on the virtualpixel accuracy indication information.

According to the image encoding device and the image decoding device ofthe present invention, in a case of performing encoding that usesmultiple color spaces without being limited to the fixed color spaces ofY, Cb, Cr, etc., it is possible to flexibly select intra prediction modeinformation and inter prediction mode information to be used for therespective color components, and to conduct an optimal encoding processeven in a case where there are diverse definitions of the color spaces.

BRIEF DESCRIPTION OF THE DRAWINGS

Preferred embodiments of the present invention will be described indetail based on the following figures, wherein:

FIG. 1 is an explanatory view illustrating a configuration of a videoencoding device in a first embodiment;

FIG. 2 is an explanatory view illustrating a configuration of a videodecoding device in the first embodiment;

FIG. 3 are explanatory views illustrating a predicted image generatingmethod in intra 4×4 prediction modes evaluated in a spatial predictionunit in FIG. 1;

FIG. 4 are explanatory views illustrating the predicted image generatingmethod in intra 16×16 prediction modes evaluated in the spatialprediction unit in FIG. 1;

FIG. 5 is a flowchart illustrating a procedure of an intra predictionmode determining process performed in the video encoding device in FIG.1;

FIG. 6 is an explanatory view illustrating a data sequence of a videobit stream output from the video encoding device in the firstembodiment;

FIG. 7 is a flowchart illustrating a procedure of an intra predictiondecoding process performed in the video decoding device in FIG. 2;

FIG. 8 is an explanatory view illustrating another data sequence of thevideo bit stream output from the video encoding device in the firstembodiment;

FIG. 9 are explanatory views illustrating the predicted image generatingmethod in intra prediction modes for chrominance components in an AVCstandard;

FIG. 10 are explanatory views illustrating conventional and currentmacroblocks;

FIG. 11 is an explanatory view illustrating a configuration of the videoencoding device in a second embodiment;

FIG. 12 is an explanatory view illustrating a configuration of a videodecoding device in the second embodiment;

FIG. 13 are explanatory views illustrating the predicted imagegenerating method in intra 8×8 prediction modes evaluated in the spatialprediction unit in FIG. 11;

FIG. 14 is a flowchart illustrating a procedure of an intra encodingmode determining process performed in the video encoding device in FIG.11;

FIG. 15 is an explanatory view illustrating a data sequence of the videobit stream output from the video encoding device in the secondembodiment;

FIG. 16 is an explanatory view illustrating another data sequence of thevideo bit stream output from the video encoding device in the secondembodiment;

FIG. 17 is a flowchart illustrating a procedure of the intra predictiondecoding process performed in the video decoding device in FIG. 12;

FIG. 18 are explanatory views illustrating parameters of the intraprediction mode encoding process of a C0 component in a thirdembodiment;

FIG. 19 are explanatory views illustrating parameters of the intraprediction mode encoding process of a C1 component in the thirdembodiment;

FIG. 20 are explanatory views illustrating parameters of the intraprediction mode encoding process of a C2 component in the thirdembodiment;

FIG. 21 is a flowchart illustrating a flow of an intra prediction modeencoding process in the third embodiment;

FIG. 22 is a flowchart illustrating another flow of the intra predictionmode encoding process in the third embodiment;

FIG. 23 is a flowchart illustrating a flow of an intra prediction modedecoding process in the third embodiment;

FIG. 24 is an explanatory view illustrating another data sequence of thevideo bit stream output from the video encoding device in the fourthembodiment;

FIG. 25 is a flowchart illustrating another flow of the intra predictionmode encoding process in a fifth embodiment;

FIG. 26 are explanatory views illustrating a prediction value settingrule shown as tables in the fifth embodiment;

FIG. 27 is a flowchart illustrating an encoding procedure in a sixthembodiment;

FIG. 28 is an explanatory view illustrating a binary sequence structureof CurrIntraPredMode in the sixth embodiment;

FIG. 29 is an explanatory view illustrating another binary sequencestructure of CurrIntraPredMode in the sixth embodiment;

FIG. 30 is an explanatory view illustrating a configuration of the videoencoding device in a seventh embodiment;

FIG. 31 is an explanatory view illustrating a configuration of the videodecoding device in the seventh embodiment;

FIGS. 32A to 32H are explanatory views each illustrating the block sizefor each macroblock;

FIG. 33 is a flowchart illustrating a flow of the inter prediction modedetermining process in the seventh embodiment;

FIG. 34 is an explanatory view illustrating the data sequence of thevideo stream output from the video encoding device in the seventhembodiment;

FIG. 35 is a flowchart illustrating a flow of a process performed in avariable length decoding unit in the seventh embodiment;

FIG. 36 is an explanatory view illustrating another data sequence of thevideo stream output from the video encoding device in the seventhembodiment;

FIG. 37 is an explanatory view illustrating another data sequence of thevideo stream output from the video encoding device in the seventhembodiment;

FIG. 38 is a flowchart illustrating a flow of the inter prediction modedetermining process in an eighth embodiment;

FIG. 39 is an explanatory view illustrating the data sequence of the bitstream at a macroblock level in the eighth embodiment;

FIG. 40 is a flowchart illustrating a flow of an inter prediction imagegenerating process in the eighth embodiment;

FIG. 41 is an explanatory view illustrating another data sequence of thebit stream at the macroblock level in the eighth embodiment;

FIG. 42 is an explanatory view illustrating another data sequence of thebit stream at the macroblock level in the eighth embodiment;

FIG. 43 is a flowchart illustrating a flow of the inter prediction modedetermining process in a ninth embodiment;

FIG. 44 is a flowchart illustrating a flow of the inter prediction imagegenerating process in the ninth embodiment;

FIG. 45 is an explanatory view illustrating a configuration of a motionvector encoding unit;

FIG. 46 are explanatory views illustrating operations of the motionvector encoding unit;

FIG. 47 is an explanatory view illustrating a configuration of a motionvector decoding unit;

FIGS. 48A and 48B are explanatory views each illustrating a state of abit stream syntax;

FIG. 49 is an explanatory view illustrating a structure of macroblockencoded data in an eleventh embodiment;

FIG. 50 is an explanatory view illustrating a detailed structure ofencoded data of Cn component header information in FIG. 49 in theeleventh embodiment;

FIG. 51 is an explanatory view illustrating another structure of themacroblock encoded data in the eleventh embodiment;

FIG. 52 is an explanatory view illustrating a structure of the bitstream in the eleventh embodiment;

FIG. 53 is an explanatory view illustrating a structure of slices in theeleventh embodiment;

FIG. 54 is an explanatory view illustrating an internal configuration ofa variable length encoding unit, which is related to an arithmeticcoding process, in a twelfth embodiment;

FIG. 55 is a flowchart illustrating a flow of the arithmetic codingprocess in the variable length encoding unit in the twelfth embodiment;

FIG. 56 is an explanatory view illustrating a detailed flow of a processof Step S162 in FIG. 55 in the twelfth embodiment;

FIG. 57 is an explanatory view illustrating a concept of a context model(ctx);

FIG. 58 is an explanatory view illustrating an example of the contextmodel regarding the motion vector of the macroblock;

FIG. 59 is an explanatory view illustrating an internal configuration ofthe variable length decoding unit, which is related to an arithmeticdecoding process, in the twelfth embodiment;

FIG. 60 is a flowchart illustrating a flow of the arithmetic decodingprocess in the variable length decoding unit in the twelfth embodiment;

FIG. 61 is an explanatory view illustrating the context model in thetwelfth embodiment;

FIGS. 62A and 62B are explanatory views illustrating a differencebetween modes of current macroblocks in the twelfth embodiment;

FIG. 63 is an explanatory view illustrating the configurations of theencoding device and the decoding device in a thirteenth embodiment;

FIG. 64 is an explanatory view illustrating the configuration of thevideo encoding device in the thirteenth embodiment;

FIG. 65 is an explanatory view illustrating the configuration of thevideo decoding device in the thirteenth embodiment;

FIG. 66 is an explanatory view illustrating a common encoding process ina fourteenth embodiment;

FIG. 67 is an explanatory view illustrating an independent encodingprocess in the fourteenth embodiment;

FIG. 68 is an explanatory view illustrating a motion predictionreference relationship in a time direction between pictures in theencoding device and the decoding device in the fourteenth embodiment;

FIG. 69 is an explanatory view illustrating an example of the structureof the bit stream generated in the encoding device in the fourteenthembodiment and input and subjected to a decoding process in the decodingdevice in the fourteenth embodiment;

FIG. 70 is an explanatory view illustrating the bit stream structures ofslice data in the common encoding process and the independent encodingprocess, respectively;

FIG. 71 is an explanatory view illustrating a schematic configuration ofthe encoding device in the fourteenth embodiment;

FIG. 72 is an explanatory view illustrating a state where a processingdelay on an encoding device side is reduced;

FIG. 73 is an explanatory view illustrating an internal configuration ofa first picture encoding unit;

FIG. 74 is an explanatory view illustrating an internal configuration ofa second picture encoding unit;

FIG. 75 is an explanatory view illustrating a schematic configuration ofthe decoding device in the fourteenth embodiment;

FIG. 76 is an explanatory view illustrating an internal configuration ofa first picture decoding unit;

FIG. 77 is an explanatory view illustrating an internal configuration ofa second picture decoding unit;

FIG. 78 is an explanatory view illustrating an internal configuration ofthe first picture encoding unit which is subjected to a color spacetransform process;

FIG. 79 is another explanatory view illustrating the internalconfiguration of the first picture encoding unit which is subjected tothe color space transform process;

FIG. 80 is an explanatory view illustrating the internal configurationof the first picture encoding unit which is subjected to an inversecolor space transform process;

FIG. 81 is another explanatory view illustrating the internalconfiguration of the first picture encoding unit which is subjected tothe inverse color space transform process;

FIG. 82 is an explanatory view illustrating a structure of encoded dataof macroblock header information contained in the bit stream in aconventional YUV 4:2:0 format;

FIG. 83 is an explanatory view illustrating an internal configuration ofa prediction unit in the first picture decoding unit which ensurescompatibility with respect to the bit stream in the conventional YUV4:2:0 format;

FIG. 84 is an explanatory view illustrating a structure of the bitstream of the encoded data to be multiplexed in the fifteenthembodiment;

FIG. 85 is an explanatory view illustrating information of a pictureencoding type when picture data in an access unit beginning with an AUDNAL unit is encoded;

FIG. 86 is an explanatory view illustrating another structure of the bitstream of the encoded data to be multiplexed in the fifteenthembodiment;

FIG. 87 is an explanatory view illustrating a schematic configuration ofthe encoding device in a sixteenth embodiment;

FIG. 88 is an explanatory view illustrating an internal configuration ofa picture encoding unit;

FIG. 89 are explanatory views illustrating the use of a different blocksize for each chrominance component;

FIGS. 90A to 90L are explanatory views each illustrating the block sizefor each macroblock;

FIG. 91 is an explanatory view illustrating the data sequence of thevideo stream output from the picture encoding unit;

FIG. 92 is an explanatory view illustrating a schematic configuration ofthe decoding device in a sixteenth embodiment;

FIG. 93 is an explanatory view illustrating an internal configuration ofa decoding unit;

FIG. 94 is an explanatory view illustrating a method of creating ahalf-pixel prediction pixel;

FIG. 95 is an explanatory view illustrating only a horizontal process inthe method of creating a half-pixel prediction pixel at a time of a ¼pixel MC;

FIG. 96 is an explanatory view illustrating a schematic configuration ofthe encoding device in a seventeenth embodiment;

FIG. 97 is an explanatory view illustrating a data sequence of the videostream output from the picture encoding unit; and

FIG. 98 is an explanatory view illustrating a schematic configuration ofthe decoding device in the seventeenth embodiment.

DESCRIPTION OF THE PREFERRED EMBODIMENTS First Embodiment

In a first embodiment of the present invention, an encoding device whichperforms closed encoding within a frame in units of rectangular regions(macroblocks), each consisting of 16×16 pixels, obtained by equallydividing a video frame input in the 4:4:4 format, and a decoding devicecorresponding to the encoding device will be described. The encodingdevice and the decoding device according to the present invention arebased on the encoding method employed in Non-patent Document 1 andimparted with characteristics specific to the present invention. Notethat in all the embodiments described below, the size of the macroblockis not required to be limited to 16×16 pixels of the frame image. Forexample, as in the case of an interlaced signal, a 16×16 pixel block ofa field image may be a macroblock when a field is used as a screenserving as a unit of encoding. Alternatively, the encoding may beperformed while adaptively changing the block size of the macroblockdepending on whether the macroblock is encoded as a frame image or afield image.

FIG. 1 illustrates a configuration of a video encoding device accordingto the first embodiment of the present invention, and FIG. 2 illustratesa configuration of a video decoding device according to the firstembodiment of the present invention. In FIG. 2, the components denotedby the same reference numerals as those in the encoding deviceillustrated in FIG. 1 are the same components.

Hereinafter, with reference to FIGS. 1 and 2, the operations of theentire encoding device and the entire decoding device, and an intraprediction mode determining process and an intra prediction decodingprocess which are specific operations according to the first embodimentwill be described.

1. Outline of Operation of the Encoding Device

In the encoding device illustrated in FIG. 1, as an input video signal1, each video frame is input in the 4:4:4 format. As illustrated in FIG.10, the video frame to be input is input to the encoding device on themacroblock basis. Each macroblock is obtained by dividing each of threecolor components in a block of 16×16 pixels having the same size andthen aggregating the obtained blocks of the three color components.

First, in a spatial prediction unit 2, an intra prediction process isperformed for each color component on the macroblock basis by using alocal decoded image 15 to be stored in memories 16. Three memories areprovided for three image planes corresponding to the respective colorcomponents (the number of memories is described as three in thisembodiment, but the number of memories may be appropriately changeddepending on the design). The intra prediction includes an intra 4×4prediction mode and an intra 16×16 prediction mode. In the intra 4×4prediction mode, spatial prediction is performed in units of blocksillustrated in FIG. 3, each being composed of 4 pixels×4 lines, by usingthe neighboring pixels of the block. In the intra 16×16 prediction mode,spatial prediction is performed on the macroblock basis illustrated inFIG. 4, each being composed of 16 pixels×16 lines, by using theneighboring pixels of the macroblock.

(a) Intra 4×4 Prediction Mode

A luminance signal 16×16 pixel block in the macroblock is divided intosixteen blocks, each being a 4×4 pixel block. Then, any of nine modesillustrated in FIG. 3 is selected for each 4×4 pixel block. Pixels inthe neighboring blocks (upper left, upper, upper right, and left blocks)which have been encoded and subjected to a local decoding process to bestored in the memories 16, are used for the generation of a predictedimage.

Intra4×4_pred_mode=0: Neighboring upper pixels are used as a predictedimage.

Intra4×4_pred_mode=1: Neighboring left pixels are used as a predictedimage.

Intra4×4_pred_mode=2: An average value of eight neighboring pixels isused as a predicted image.

Intra4×4_pred_mode=3: A weighted average of every two or three pixels iscalculated from the neighboring pixels and the obtained weighted averageis used as a predicted image (corresponding to a diagonal down-left edgeat 45 degrees).

Intra4×4_pred_mode=4: A weighted average of every two or three pixels iscalculated from the neighboring pixels and the obtained weighted averageis used as a predicted image (corresponding to a diagonal down-rightedge at 45 degrees).

Intra4×4_pred_mode=5: A weighted average of every two or three pixels iscalculated from the neighboring pixels and the obtained weighted averageis used as a predicted image (corresponding to a vertical right edge at22.5 degrees).

Intra4×4_pred_mode=6: A weighted average of every two or three pixels iscalculated from the neighboring pixels and the obtained weighted averageis used as a predicted image (corresponding to a horizontal down edge at67.5 degrees).

Intra4×4_pred_mode=7: A weighted average of every two or three pixels iscalculated from the neighboring pixels and the obtained weighted averageis used as a predicted image (corresponding to a vertical left edge at22.5 degrees).

Intra4×4_red_mode=8: A weighted average of every two or three pixels iscalculated from the neighboring pixels and the obtained weighted averageis used as a predicted image (corresponding to a horizontal up edge at112.5 degrees).

When the intra 4×4 prediction mode is selected, sixteen pieces of modeinformation are required for each macroblock. Therefore, in order toreduce the amount of codes of the mode information itself, predictiveencoding is performed based on the mode information of the neighboringblocks, taking advantage of a high correlation of the mode informationbetween the neighboring blocks.

(b) Intra 16×16 Prediction Mode

In the intra 16×16 prediction mode, the 16×16 pixel block correspondingto the macroblock size is predicted at a time. Any of four modesillustrated in FIG. 4 is selected for each macroblock unit. As in thecase of the intra 4×4 prediction mode, the pixels in the neighboring(upper left, upper, and left) macroblocks, which have already beenencoded and subjected to the local decoding process to be stored in thememories 16, are used for the generation of a predicted image.

Intra 16×16_pred_mode=0: Sixteen pixels in the lowermost line of theupper macroblock are used as a predicted image.

Intra 16×16_pred_mode=1: Sixteen pixels in the rightmost line of theleft macroblock are used as a predicted image.

Intra 16×16_pred_mode=2: An average value of thirty-two pixels, i.e.,sixteen pixels (A of FIG. 4) in the lowermost line of the uppermacroblock and sixteen pixels (B of FIG. 4) in the leftmost line in theleft macroblock, is used as a predicted image.

Intra 16×16_pred_mode=3: Thirty-one pixels corresponding to a pixel atthe lower right corner in the upper left macroblock, fifteen pixels inthe lowermost line of the upper macroblock (except for the open pixel),and fifteen pixels in the rightmost line of the left macroblock (exceptfor the open pixel) are used to perform a predetermined computingprocess (weighted addition process according to the pixels to be usedand pixel positions to be predicted), thereby obtaining a predictedimage.

In the video encoding device according to the first embodiment of thepresent invention, the intra prediction process method is switched forthree color components based on an intra prediction mode-sharingidentification flag 23. This will be described in detail in the section2 below.

The spatial prediction section 2 executes the prediction process on allthe modes or a subset illustrated in FIGS. 3 or 4 to obtain a predictiondifference signal 4 by a subtracter 3. A prediction efficiency of theprediction difference signal 4 is evaluated in an encoding modedetermining unit 5. As a result, the prediction mode in which theoptimal prediction efficiency is obtained for the macroblock to bepredicted, from the prediction process executed in the spatialprediction unit 2, is output as an encoding mode 6. In this case, theencoding mode 6 contains determination information (corresponding to anintra-encoding mode of FIG. 6) indicating which of the intra 4×4prediction mode and the intra 16×16 prediction mode is used and alsocontains each prediction mode (the intra4×4_pred_mode or theintra16×16_pred_mode described above) used for each prediction unit areafor prediction. The prediction unit area corresponds to a 4×4 pixelblock in the case of the intra 4×4 prediction mode, or a 16×16 pixelblock in the case of the intra16×16_pred_mode. For the selection of theencoding mode 6, a weighting coefficient 20 for each of the encodingmodes, which is determined based on the determination of an encodingcontrol unit 19, may be taken into consideration. The optimal predictiondifference signal 4 obtained by using the encoding mode 6 in theencoding mode determining unit 5 is output to an orthogonal transformunit 8. The orthogonal transform unit 8 transforms the input predictiondifference signal 4 into an orthogonal transform coefficient, which isin turn output to a quantization unit 9. The quantization unit 9quantizes the input prediction difference signal 4 based on aquantization parameter 21 determined by the encoding control unit 19 tooutput the quantized signal as a quantized transform coefficient 10 to avariable length coding unit 11. The quantized transform coefficient 10is entropy-coded in the variable length coding unit 11 by means such asHuffman encoding or arithmetic coding. The quantized transformcoefficient 10 also passes through an inverse quantization unit 12 andan inverse orthogonal transform unit 13 to be restored to a localdecoded prediction difference signal 14. Then, the local decodedprediction difference signal 14 is added to a predicted image 7generated based on the encoding mode 6 in an adder 18 to create a localdecoded image 15. The local decoded image 15 is stored in the memories16 to be used for the subsequent intra prediction process. Further, adeblocking filter control flag 24 indicating whether or not a deblockingfilter is to be applied to the macroblock is also input to the variablelength coding unit 11 (the deblocking filter process itself is notnecessary for the encoding process because the pixel data before theapplication of the deblocking filter is stored in the memories 16 in theprediction process executed in the spatial prediction unit 2. In thedecoding device, however, the deblocking filter is applied uponinstruction of the deblocking filter control flag 24 to obtain the finaldecoded image).

The intra prediction mode-sharing identification flag 23, the quantizedtransform coefficient 10, the encoding mode 6, and the quantizingparameter 21, which are input to the variable length encoding unit 11,are arranged and shaped according to a predetermined syntax to be outputto a transmission buffer 17. The transmission buffer 17 smoothes theobtained bit stream according to the band of a transmission path or thereading velocity of a recording medium to which the encoding device isconnected, to output the bit stream as a video stream 22. Thetransmission buffer 17 outputs feedback information to the encodingcontrol unit 19 according to a state of accumulation of the bit streamsin the transmission buffer 17 to control the amount of codes generatedin the encoding of subsequent video frames.

2. Intra Prediction Mode Determining Process in the Encoding Device

The intra prediction mode which is a feature of the encoding deviceaccording to the first embodiment of the present invention will bedescribed in detail. The process is executed on the macroblock basis,each macroblock consisting of an aggregation of the three colorcomponents described above. The process is mainly performed by thespatial prediction unit 2 and the encoding mode determining unit 5 inthe encoding device illustrated in FIG. 1. FIG. 5 is a flowchartillustrating a flow of the process. Hereinafter, image data of the threecolor components constituting the blocks are referred to as C0, C1, andC2, respectively.

First, the encoding mode determining unit 5 receives the intraprediction mode-sharing identification flag 23 to determine, based on avalue of the flag 23, whether or not the intra prediction mode common toC0, C1, and C2 is used (Step S1 of FIG. 5). If the intra prediction modeis used in common between C0, C1, and C2, the process proceeds to StepS2 and the following steps. If the intra prediction mode is not used incommon, the process proceeds to Step S5 and the following steps.

When the intra prediction mode is used in common between C0, C1, and C2,the encoding mode determining unit 5 notifies the spatial predictionunit 2 of all the selectable intra 4×4 prediction modes. The spatialprediction unit 2 evaluates the prediction efficiencies of all theselectable intra 4×4 prediction modes to select the optimal intra 4×4prediction mode common to C0, C1, and C2 (Step S2). Next, the encodingmode determining unit 5 notifies the spatial prediction unit 2 of all ora part of the selectable intra 16×16 prediction modes. The spatialprediction unit 2 evaluates the prediction efficiencies of the notifiedintra 16×16 prediction modes to select the optimal intra 16×16prediction mode common to C0, C1, and C2 (Step S3). The encoding modedetermining unit 5 finally selects the optimal mode in terms of theprediction efficiency from the modes obtained in Steps S2 and S3 (StepS4) to terminate the process.

When the intra prediction mode is not used in common between C0, C1, andC2 and the optimal mode is selected for each of C0, C1, and C2, theencoding mode determining unit 5 notifies the spatial prediction unit 2of all or a part of the intra 4×4 prediction modes selectable for a Ci(i<=0<3) component. The spatial prediction unit 2 evaluates theprediction efficiencies of all the notified intra 4×4 prediction modesto select the intra 4×4 prediction mode optimal for the Ci (i<=0<3)component (Step S6). Similarly, the spatial prediction unit 2 selectsthe intra 16×16 prediction mode optimal for the Ci (i<=0<3) component(Step S7). Finally, in Step S8, the encoding mode determining unit 5determines the intra prediction mode optimal for the Ci (i<=0<3)component from the selected prediction modes.

As a prediction efficiency evaluation norm of the prediction modeexecuted in the spatial prediction unit 2, for example, arate-distortion cost given by:

Jm=Dm+λRm (λ: positive number)

can be used. In this expression, Dm is an encoding distortion or aprediction error amount when an intra prediction mode m is applied. Theencoding distortion is obtained by obtaining a prediction error applyingthe intra prediction mode m, decoding a video image from the result oftransform and quantization of the prediction error, and then measuringan error with respect to a signal prior to encoding. The predictionerror amount is obtained by obtaining a difference between a predictedimage and a signal prior to encoding when the intra prediction mode m isused and then quantifying the difference. For example, a sum of absolutedistance (SAD) is used as the prediction error amount. Rm is a generatedcode amount when the intra prediction mode m is used. Specifically, Jmis a value defining a tradeoff between the amount of codes and thedegree of deterioration when the intra prediction mode m is used. Theintra prediction mode m providing the smallest Jm provides the optimalsolution.

When the encoding device executes the process of Step S2 and thefollowing steps, one piece of intra prediction mode information isallocated to the macroblock containing three color components. On theother hand, when the encoding device executes the process of Step S5 andthe following steps, intra prediction mode information is allocated toeach of the color components. The intra prediction mode informationallocated to the macroblock differs for each case, and therefore theintra prediction mode-sharing identification flag 23 needs to bemultiplexed in the bit stream to enable the decoding device to recognizewhether the encoding device has executed the process of Step S2 and thefollowing steps or the process of Step S5 and the following steps. Datasequence of the above-mentioned bit stream is illustrated in FIG. 6.

FIG. 6 illustrates the data sequence of the bit stream at the macroblocklevel. An intra-encoding mode 28 indicates information for determiningwhether the prediction mode is the intra 4×4 mode or the intra 16×16mode. A basic intra prediction mode 29 indicates common intra predictionmode information when the intra prediction mode-sharing identificationflag 23 indicates that the mode is “common to C0, C1, and C2,” andindicates intra prediction mode information for C0 when the intraprediction mode-sharing identification flag 23 indicates that the modeis not “common to C0, C1, and C2.” An extended intra prediction mode 30is multiplexed only when the intra prediction mode-sharingidentification flag 23 indicates that the mode is not “common to C0, C1,and C2” and indicates intra prediction mode information for C1 and C2.Subsequently, the quantization parameter 21 and the quantized transformcoefficient are multiplexed. The encoding mode 6 of FIG. 1 is a generalterm of the intra-encoding mode 28 and the intra prediction modes (basicand extended) described above (FIG. 6 does not illustrate the deblockingfilter control flag 24 which is input to the variable length coding unit11 in FIG. 1, and the illustration thereof is omitted because thedeblocking filter control flag 24 is not an essential component for thedescription of the feature of the first embodiment).

In the 4:2:0 format which has been employed in the conventional videoencoding standard, the color space definition is fixed to Y, Cb, and Cr.In the 4:4:4: format, however, a color space is not limited to that ofY, Cb, and Cr, and various color spaces can be used. By constituting theintra prediction mode information as illustrated in FIG. 6, the optimalencoding process can be performed even when the definition of the colorspace of the input video signal 1 varies. For example, when the colorspace is defined by R, G, and B, the structure of a video textureremains equally in the R, G, and B components. Therefore, the use of thecommon intra prediction mode information reduces the redundancy of theintra prediction mode information itself to enhance the encodingefficiency. On the other hand, when the color space is defined by Y, Cb,and Cr, the structure of the video texture is concentrated on Y.Therefore, the common intra prediction mode does not necessarily providethe optimal result. Then, by adaptively using the extended intraprediction mode 30, the optimal encoding efficiency can be obtained.

3. Outline of Operation of the Decoding Device

The decoding device illustrated in FIG. 2 receives the video stream 22according to the data sequence illustrated in FIG. 6 output from theencoding device illustrated in FIG. 1 and performs a decoding process onthe macroblock basis, each macroblock containing three color componentsin the same size (in the 4:4:4 format), to restore each video frame.

First, a variable length decoding unit 25 receives the stream 22 anddeciphers the stream 22 according to a predetermined syntax, therebyextracting information such as the intra prediction mode-sharingidentification flag 23, the quantized transform coefficient 10, theencoding mode 6, and the quantization parameter 21. The quantizedtransform coefficient 10 is input together with the quantizationparameter 21 to the inverse quantization unit 12, where an inversequantization process is performed. Subsequently, the output from theinverse quantization unit 12 is input to an inverse orthogonal transformunit 13 to be restored to a local decoded prediction difference signal14. On the other hand, the encoding mode 6 and the intra predictionmode-sharing identification flag 23 are input to the spatial predictionunit 2 to obtain the predicted image 7 according to the inputinformation. A specific procedure for obtaining the predicted image 7will be described below. The local decoded prediction difference signal14 and the predicted image 7 are added by the adder 18 to obtain atemporary decoded image 15 (which is exactly the same signal as thelocal decoded image 15 in the encoding device). The temporary decodedimage 15 is written back to the memories 16 to be used for the intraprediction of the subsequent macroblocks. Three memories are providedfor three image planes corresponding to the respective color components(the number of memories is described as three in this embodiment, butthe number of memories can be appropriately changed according to thedesign). Moreover, based on an instruction of the deblocking filtercontrol flag 24 decoded by the variable length decoding unit 25, thedeblocking filter 26 is caused to act on the temporary decoded image 15to obtain a final decoded image 27.

4. Intra Prediction Decoding Process in the Decoding Device

An intra prediction image generating process which is a feature of thedecoding device according to the first embodiment of the presentinvention will be described in detail. The process is executed on themacroblock basis, each macroblock consisting of an aggregation of thethree color components described above. The process is mainly performedby the variable length decoding unit 25 and the spatial prediction unit2 in the decoding unit illustrated in FIG. 2. FIG. 7 is a flowchartillustrating a flow of the process.

In the flowchart illustrated in FIG. 7, Steps S10 to S14 are executed inthe variable length decoding unit 25. The data sequence of the videostream 22 which is input to the variable length decoding unit 25 isaccording to the data sequence illustrated in FIG. 6. In Step S10, amongthe data illustrated in FIG. 6, the intra-encoding mode 28 is firstdecoded. Then, the intra prediction mode-sharing identification flag 23is decoded (Step S11). Further, the basic intra prediction mode 29 isdecoded (Step S12). In Step S13, the result of the intra predictionmode-sharing identification flag 23 is used to determine whether or notthe intra prediction mode is used in common between C0, C1, and C2. Whenthe intra prediction mode is used in common between C0, C1, and C2, thebasic intra prediction mode 29 is used for all of C0, C1, and C2. Whenthe intra prediction mode is not used in common, the basic intraprediction mode 29 is used as a mode for C0. Further, the extended intraprediction mode 30 is decoded (Step S14) to obtain mode information ofC1 and C2. Through the above-mentioned process, the encoding mode 6 foreach of the color components is determined. Therefore, the variablelength decoding unit 25 outputs the determined encoding mode(s) 6 forthe respective color components to the spatial prediction unit 2. Then,according to Steps S15 to S17, an intra prediction image for each colorcomponent is obtained. A process for obtaining the intra predictionimages follows the process illustrated in FIGS. 3 and 4, and is the sameas that performed in the encoding device illustrated in FIG. 1.

FIG. 8 illustrates a variation of the bit stream data sequenceillustrated in FIG. 6. In FIG. 7, the intra prediction mode-sharingidentification flag 23 is multiplexed not as a flag at the macroblocklevel, but as a flag positioned in an upper data layer such as a slicelayer, a picture layer, and a sequence layer. Moreover, an extendedintra prediction mode table indication flag 31 is provided to enable theselection of a code table which defines a code word of the extendedintra prediction mode 30 from a plurality of code tables. As a result,when a satisfactory prediction efficiency is ensured by switching in theupper layer equal to or higher than the slice layer, overhead bits canbe reduced without multiplexing the intra prediction mode-sharingidentification flags 23 one by one at the macroblock level. For theextended intra prediction mode 30, the extended intra prediction modetable indication flag 31 is provided to enable the selection ofprediction modes specified for the C1 and C2 components, which is notthe same as the definition of the basic intra prediction mode 29. As aresult, the encoding process adapted to the definition of the colorspace can be performed. For example, the encoding of the 4:2:0 formataccording to AVC, an intra prediction mode set different from that forthe luminance (Y) is defined for the chrominance components (Cb and Cr).In the 4:2:0 format, the size of a chrominance signal in the macroblockis 8 pixels by 8 lines. Any of four modes illustrated in FIG. 9 isselected for each macroblock to perform the decoding process. The samemode is used for two chrominance signals Cb and Cr. Except for DCprediction with intra_chroma_pred_mode=0, the same prediction process asthat of the intra 16×16 prediction mode illustrated in FIG. 4 isperformed. In the DC prediction, however, an 8×8 block is divided intofour 4×4 blocks. The positions of pixels from which an average value isobtained are changed for each block to perform the process. For theblock indicated by “a+x, a or x” in FIG. 9, when both pixels a andpixels x are available, pixels a and x, that is, eight pixels in total,when only the pixels a are available, four pixels a, and when only thepixels x are available, four pixels x are used to obtain an averagevalue to use the average value as the predicted image 7. When both thepixels a and x are unavailable, a value 128 is used as the predictedimage 7. For a block indicated by “b or x,” when pixels b are available,four pixels b, when only pixels x are available, four pixels x are usedto obtain an average value.

In this manner, when the intra prediction mode set is required to bechanged according to the property of the color component, a moresuitable encoding efficiency can be obtained by the structure such asthe syntax illustrated in FIG. 8.

Second Embodiment

In the second embodiment of the present invention, another encodingdevice which performs closed encoding within a frame in units ofrectangular areas (macroblocks), each consisting of 16 by 16 pixels,obtained by equally dividing a video frame input in the 4:4:4 format,and a decoding device corresponding to the encoding device will bedescribed. As in the first embodiment of the present invention, theencoding device and the decoding device of this embodiment are providedwith characteristics specific to the present invention based on theencoding method employed in Non-patent Document 1 cited above.

FIG. 11 illustrates a configuration of a video encoding device, and FIG.12 illustrates a video decoding device according to the secondembodiment of the present invention. In FIG. 11, the components denotedby the same reference numerals as those in the encoding deviceillustrated in FIG. 1 are the same components. In FIG. 12, thecomponents denoted by the same reference numerals as those in theencoding device illustrated in FIG. 11 are the same components. In FIG.11, a transformation block size identification flag 32 and an intraencoding mode-sharing identification flag 33 are provided.

Hereinafter, the operations of the entire encoding device and decodingdevice according to the second embodiment of the present invention, andan intra encoding/prediction mode determining process and an intraprediction decoding process which are specific operations according tothis embodiment will be described with reference to FIGS. 11 and 12.

1. Outline of Operation of the Encoding Device

In the encoding device illustrated in FIG. 11, as the input video signal1, each video frame is input to the encoding device in the 4:4:4 format.Further, as illustrated in FIG. 10, the video signal is input on themacroblock basis, each macroblock obtained by dividing three colorcomponents into the blocks of the same size and then aggregating theblocks.

In the spatial prediction unit 2, an intra prediction process isperformed for each color component on the macroblock basis by using thelocal decoded image 15 to be stored in the memories 16. The intraprediction has the intra 4×4 prediction mode, an intra 8×8 predictionmode, and the intra 16×16 prediction mode. In the intra 4×4 predictionmode, spatial prediction is performed in units of blocks illustrated inFIG. 3, each being composed of 4 pixels×4 lines, by using theneighboring pixels of the block. In the intra 8×8 prediction mode,spatial prediction is performed in units of blocks illustrated in FIG.13, each being composed of 8 pixels×8 lines, by using the neighboringpixels of the block. In the intra 16×16 prediction mode, spatialprediction is performed on the macroblock basis illustrated in FIG. 4,each being composed of 16 pixels×16 lines, by using the neighboringpixels of the macroblock. In the encoding device according to the secondembodiment of the present invention, the prediction mode is switchedbetween the intra 4×4 prediction mode and the intra 8×8 prediction modeaccording to a state of the transformation block size identificationflag 32. The selection of the intra prediction mode for encoding acertain macroblock from the intra 4×4 prediction mode, the intra 8×8prediction mode, and the intra 16×16 prediction mode can be representedby the intra encoding mode as in FIG. 6. The encoding device accordingto the second embodiment of the present invention is provided with twointra encoding modes: an intra N×N prediction encoding mode for theencoding using any of the intra 4×4 prediction mode and the intra 8×8prediction mode (N is 4 or 8); and an intra 16×16 prediction encodingmode for the encoding using the intra 16×16 prediction mode.Hereinafter, the description will be given for each of the intraencoding modes.

(a) Intra N×N Prediction Encoding Mode

In the intra N×N prediction encoding mode, the intra 4×4 prediction modeand the intra 8×8 prediction mode are selectively switched for encoding.In the intra 4×4 prediction mode, a luminance signal 16×16 pixel blockin the macroblock is divided into sixteen blocks, each being composed of4×4 pixels, and the prediction mode is individually selected for each ofthe 4×4 pixel blocks. In the intra 8×8 prediction mode, a luminancesignal 16×16 pixel block in the macroblock is divided into four blocks,each being composed of 8×8 pixels, and the prediction mode isindividually selected for each of the 8×8 pixel blocks. The switchingbetween the intra 4×4 prediction mode and the intra 8×8 prediction modeis associated with the state of the transformation block sizeidentification flag 32. This will be described below. In the intra 4×4prediction mode, any of nine modes illustrated in FIG. 3 is selected foreach of the 4×4 pixel blocks, as described in the first embodiment ofthe present invention. The pixels in the neighboring blocks (upper left,upper, upper right, and left blocks), which have been encoded andsubjected to the local decoding process to be stored in the memories 16,are used for generating a predicted image.

On the other hand, in the intra 8×8 prediction mode, any of nine modesillustrated in FIG. 13 is selected for each of the 8×8 pixel blocks. Asis apparent from the comparison with FIG. 3, the intra 8×8 predictionmode of FIG. 13 is a modification of the prediction method in the intra4×4 prediction mode for the adaptation to the 8×8 pixel block.

Intra8×8_pred_mode=0: Upper neighboring pixels are used as a predictedimage.

Intra8×8_pred_mode=1: Left neighboring pixels are used as a predictedimage.

Intra8×8_pred_mode=2: An average value of eight neighboring pixels isused as a predicted image.

Intra8×8_red_mode=3: A weighted average of every two or three pixels iscalculated from the neighboring pixels to use the obtained weightedaverage as a predicted image (corresponding to a diagonal down-left edgeat 45 degrees).

Intra8×8_red_mode=4: A weighted average of every two or three pixels iscalculated from the neighboring pixels to use the obtained weightedaverage as a predicted image (corresponding to a diagonal down-rightedge at 45 degrees).

Intra8×8_red_mode=5: A weighted average of every two or three pixels iscalculated from the neighboring pixels to use the obtained weightedaverage as a predicted image (corresponding to a vertical right edge at22.5 degrees).

Intra8×8_pred_mode=6: A weighted average of every two or three pixels iscalculated from the neighboring pixels to use the obtained weightedaverage as a predicted image (corresponding to a horizontal down edge at67.5 degrees).

Intra8×8_pred_mode=7: A weighted average of every two or three pixels iscalculated from the neighboring pixels to use the obtained weightedaverage as a predicted image (corresponding to a vertical left edge at22.5 degrees).

Intra8×8_red_mode=8: A weighted average of every two or three pixels iscalculated from the neighboring pixels to use the obtained weightedaverage as a predicted image (corresponding to a horizontal up edge at112.5 degrees).

For the selection of the intra 4×4 prediction mode, sixteen pieces ofmode information are required for each macroblock. Therefore, in orderto reduce the amount of codes of the mode information itself, predictionencoding is performed based on the mode information of the neighboringblocks, taking advantage of a high correlation of the mode informationbetween the neighboring blocks.

(b) Intra 16×16 Prediction Mode

In the intra 16×16 prediction mode, the 16×16 pixel block correspondingto the macroblock size is predicted at a time and any of four modesillustrated in FIG. 4 is selected for each macroblock. As in the case ofthe intra 4×4 prediction mode, the pixels in the neighboring (upperleft, upper, and left) macroblocks, which have already been encoded andsubjected to the local decoding process to be stored in the memories 16,are used for generating a predicted image. The types of mode are asdescribed in the first embodiment of the present invention referring toFIG. 4. In the intra 16×16 prediction mode, the transformation blocksize is always 4×4. In this mode, however, two-step transform isperformed. First, sixteen DCs (direct current components correspondingto average values) are collected in units of 4×4 blocks and 4×4 blocktransform is performed in this unit. Then, an alternate currentcomponent obtained by excluding the DC component is transformed for eachof the 4×4 blocks.

The video encoding device according to the second embodiment of thepresent invention is characterized in that the intraprediction/transform/encoding methods are switched for three colorcomponents based on the intra encoding mode-sharing identification flag33. This will be described in detail in the section 2 below.

The spatial prediction unit 2 evaluates the intra prediction mode forthe input three color component signals, based on the indication of theintra encoding mode-sharing identification flag 33. The intra encodingmode-sharing identification flag 33 indicates whether the intra encodingmode is individually allocated to each of the input three colorcomponents or the same intra encoding mode is allocated to all the threecolor components, which depends on the following background.

In the 4:4:4 format, beside the Y, Cb, and Cr color space which hasconventionally been used for encoding, RGB can be directly used. In theY, Cb, and Cr color space, a component dependent on the texturestructure of the video image is removed from the Cb and Cr signals.There is a high possibility that the optimal intra encoding method isdifferent between the Y component, and the Cb and Cr components(actually, in the encoding method for encoding the 4:2:0 format inAVC/H.264 such as the high 4:2:0 profile, the design of the intraprediction mode used for the Y component differs from that used for theCb and Cr components). On the other hand, when the encoding is performedin the RGB color space, the texture structure is not removed between thecolor components as executed in the case of the Y, Cb, and Cr colorspace. Instead, because the signal components in the same space have ahigh correlation, there is a possibility that the encoding efficiencycan be enhanced by enabling the selection of the common intra encodingmode. This depends not only on the color space definition but also onthe property of the video image even if a specific color space is used.It is desirable that the encoding method itself be adaptive to such aproperty of the video signal. Therefore, in this embodiment, the intraencoding mode-sharing identification flag 33 is provided to configurethe encoding device to enable flexible encoding for a video image in the4:4:4 format.

The spatial prediction unit 2 executes the prediction process for eachof the color components for all the intra prediction modes illustratedin FIGS. 3, 4, or 13 or a predetermined subset according to the state ofthe intra encoding mode-sharing identification flag 33 set as describedabove to obtain the prediction difference signal 4 in the subtracter 3.The prediction efficiency of the prediction difference signal 4 isevaluated in the encoding mode determining unit 5. From the predictionprocess executed in the spatial prediction unit 2, the intra predictionmode, in which the optimal prediction efficiency for a target macroblockcan be obtained, is selected. In this case, when the intra N×Nprediction is selected, the intra N×N prediction encoding mode is outputas the encoding mode 6. Moreover, when the prediction mode is the intra4×4 prediction, the transformation block size identification flag 32 isset to “transform in the 4×4 block size.” On the other hand, when theprediction mode is the intra 8×8 prediction, the transformation blocksize identification flag 32 is set to “transform in the 8×8 block size.”Various methods are conceivable as a method of determining thetransformation block size identification flag 32. Since the block sizeis determined in a case where the transform is performed on a residueobtained by the intra N×N prediction in the encoding device according tothe second embodiment of the present invention, a method of determiningthe optimal intra N×N prediction mode in the encoding mode determiningunit 5 and then determining the block size according to the obtained Nvalue is given as an example. For example, assuming that thetransformation block size is the 8×8 pixel block size when the intra 4×4prediction mode is used, there is a high possibility that spatialcontinuity of the prediction signal will be interrupted in units of 4×4blocks in the prediction difference signal 4 obtained as the result ofprediction. As a result, an unnecessary high-frequency component isgenerated. Therefore, the effect of signal power concentration obtainedby the transform is reduced. When the transformation block size is setto the 4×4 pixel block according to the prediction mode, theabove-mentioned problem does not occur.

When the intra 16×16 prediction is selected in the encoding modedetermining unit 5, the intra 16×16 prediction encoding mode is outputas the encoding mode 6. For the selection of the encoding mode 6, theweighting coefficient 20 for each of the encoding modes determined bythe encoding control unit 19 may be taken into consideration.

The prediction difference signal 4 obtained in the encoding mode 6 isoutput to the orthogonal transform unit 8. The orthogonal transform unit8 transforms the input prediction difference signal to output the resultof transform as an orthogonal transform coefficient to the quantizationunit 9. The quantization unit 9 quantizes the input orthogonal transformcoefficient based on the quantization parameter 21 determined by theencoding control unit 19 to output the result of quantization as thequantized transform coefficient 10 to the variable length encoding unit11.

When the transformation block size is the 4×4 block as a unit, theprediction difference signal 4 input to the orthogonal transform unit 8is divided into 4×4 blocks to be subjected to the orthogonal transform.Then, the 4×4 blocks are quantized in the quantization unit 9. When thetransformation block size is the 8×8 block as a unit, the predictiondifference signal 4 input to the orthogonal transform unit 8 is dividedinto 8×8 blocks to be subjected to the orthogonal transform. Then, the8×8 blocks are quantized in the quantization unit 9.

The quantized transform coefficient 10 is entropy-coded in the variablelength encoding unit 11 by means such as Huffman encoding or arithmeticcoding. The quantized transform coefficient 10 in the block size basedon the transformation block size identification flag 32 or the like alsopasses through the inverse quantization unit 12 and the inverseorthogonal transform unit 13 to be restored to the local decodedprediction difference signal 14. Then, the local decoded predictiondifference signal 14 is added to the predicted image 7 generated basedon the encoding mode 6 in the adder 18 to generate the local decodedimage 15. The local decoded image 15 is stored in the memories 16 to beused for the subsequent intra prediction process. Moreover, thedeblocking filter control flag 24 indicating whether or not thedeblocking filter is to be applied to the macroblock is also input tothe variable length encoding unit 11 (the deblocking filter processitself is not required for the encoding process because the pixel dataprior to the application of the deblocking filter is stored in thememories 16 in the prediction process executed in the spatial predictionunit 2, but in the decoding device, the deblocking filter is appliedbased on the indication of the deblocking filter control flag 24 toobtain the final decoded image).

The intra encoding mode-sharing identification flag 33, the quantizedtransform coefficient 10, the encoding mode 6, and the quantizingparameter 21, which are input to the variable length encoding unit 11,are arranged and shaped according to a predetermined syntax to be outputto the transmission buffer 17. The transmission buffer 17 smoothes thebit stream according to the band of a transmission path or the readingvelocity of a recording medium to which the encoding device is connectedto output the bit stream as a video stream 22. The transmission buffer17 outputs feedback information to the encoding control unit 19according to the state of accumulation of the bit streams in thetransmission buffer 17 to control the amount of codes to be generated inthe encoding of subsequent video frames.

2. Intra Encoding Mode/Prediction Mode Determining Process in theEncoding Device

The intra encoding mode and intra prediction mode determining processwhich are characteristics of the encoding device according to the secondembodiment of the present invention will be described in detail. Theprocess is executed on the macroblock basis, each macroblock beingobtained by aggregating the three color components described above. Theprocess is mainly performed by the spatial prediction unit 2 and theencoding mode determining unit 5 in the encoding device illustrated inFIG. 11. FIG. 14 is a flowchart illustrating a flow of the process.Hereinafter, image data of the three color components constituting theblocks are referred to as C0, C1, and C2, respectively.

First, the encoding mode determining unit 5 receives the intra encodingmode-sharing identification flag 33 to determine, based on a value ofthe flag 33, whether or not the intra encoding mode common to C0, C1,and C2 is used (Step S20 of FIG. 14). If the intra encoding mode commonto C0, C1, and C2 is used, the process proceeds to Step S21. Otherwise,the process proceeds to Step S22.

When the intra encoding mode common to C0, C1, and C2 is used, theencoding mode determining unit 5 notifies the spatial prediction unit 2of all or a part of the selectable intra prediction modes (the intra N×Nprediction and the intra 16×16 prediction). The spatial prediction unit2 evaluates the prediction efficiencies of all the selectable predictionmodes to select the intra encoding mode and the intra prediction modeoptimal for all the components (Step S2 1).

On the other hand, when the optimal intra encoding mode is individuallyselected for each of C0, C1, and C2, the encoding mode determining unit5 notifies the spatial prediction unit 2 of all or a part of the intraprediction modes (the intra N×N prediction and the intra 16×16prediction) selectable for the Ci (i<=0<3) component. The spatialprediction unit 2 evaluates the prediction efficiencies of all thenotified intra prediction modes to select the intra 4×4 prediction modeoptimal for the Ci (i<=0<3) component (Step S23).

When the spatial prediction unit 2 selects the intra 4×4 prediction modeas a mode which provides the optimal prediction efficiency in Step S21or S23 above, the transformation block size identification flag 32 isset to “transform in the 4×4 block size.” On the other hand, when thespatial prediction unit 2 selects the intra 8×8 prediction mode as amode which provides the optimal prediction efficiency, thetransformation block size identification flag 32 is set to “transform inthe 8×8 block size.”

As a prediction efficiency evaluation norm of the prediction modeexecuted in the spatial prediction unit 2, for example, arate-distortion cost given by:

Jm=Dm+λRm (λ: positive number)

can be used. In this formula, Dm is an encoding distortion or aprediction error amount when an intra prediction mode m is used. Theencoding distortion is obtained by obtaining a prediction error usingthe intra prediction mode m, decoding a video image from the result oftransform and quantization of the prediction error, and then measuringan error with respect to a signal before being encoded. The predictionerror amount is obtained by obtaining a difference between a predictedimage and a signal before being encoded when the intra prediction mode mis used and then quantifying the obtained difference. For example, a sumof absolute distance (SAD) is used as the prediction error amount. Rm isa generated code amount when the intra prediction mode m is used.Specifically, Jm is a value defining a tradeoff between the amount ofcodes and the degree of deterioration when the intra prediction mode mis used. The intra prediction mode m providing the smallest Jm gives theoptimal solution.

When the encoding device executes the process of Step S21, one piece ofintra encoding mode information is allocated to one macroblockcontaining three color components. On the other hand, when the encodingdevice executes the process of Step S22 and the following steps, onepiece of intra encoding mode information is allocated to each of thecolor components (in total, three pieces of the intra encoding modeinformation). The intra prediction mode information allocated to themacroblock differs for each case, and thus the intra encodingmode-sharing identification flag 33 needs to be multiplexed in the bitstream to enable the decoding device to recognize whether the encodingdevice has executed the process of Step S21 or the process of S22 andthe following steps. A data sequence of such a bit stream is illustratedin FIG. 15.

In FIG. 15, intra encoding modes 0 (34 a), 1(34 b), and 2(34 c), whichare multiplexed in the bit stream at the macroblock level, are theencoding modes 6 for the C0, C1, and C2 components, respectively. Whenthe intra encoding mode is the intra N×N prediction encoding mode,information of the transformation block size identification flag 32 andthe intra prediction mode is multiplexed in the bit stream. On the otherhand, when the intra encoding mode is the intra 16×16 predictionencoding mode, information of the intra prediction mode is encoded as apart of the intra encoding mode information, and the information of thetransformation block size identification flag 32 and the intraprediction mode is not multiplexed in the bit stream. When the intraencoding mode-sharing identification flag 33 indicates that the intraencoding mode is “common to C0, C1, and C2,” the intra encoding modes 1(34 b) and 2(34 c), transformation block size identification flags 1(32b) and 2(32 c), and intra prediction modes 1 (35 b) and 2(35 c) are notmultiplexed in the bit stream (dotted circle of FIG. 15 indicates abranch point of the process). In this case, the intra encoding mode 0(34 a), the transformation block size identification flag 0 (32 a), andthe intra prediction mode 0 (35 a) serve as encoding information commonto all the color components. FIG. 15 shows an example where the intraencoding mode-sharing identification flag 33 is multiplexed as bitstream data at the higher-order level than the macroblock level, such asa slice, a picture, or a sequence. In particular, when the intraencoding mode-sharing identification flag 33 is used as in the exampledescribed in the second embodiment of the present invention, the colorspace does not change throughout the sequence in many cases. Therefore,the object can be achieved by multiplexing the intra encodingmode-sharing identification flag 33 at the sequence level.

In the second embodiment of the present invention, the intra encodingmode-sharing identification flag 33 is used to indicate “whether or notthe intra encoding mode is common to all the components.” Alternatively,the intra encoding mode-sharing identification flag 33 may be used toindicate “whether or not the intra encoding mode is common to specifictwo components such as C1 and C2” according to the color spacedefinition of the input video signal 1 (in the case of the Y-Cb-Cr colorspace, there is a high possibility that the intra encoding mode can bemade common to Cb and Cr). Further, the range of sharing of the intraencoding mode-sharing identification flag 33 may be limited only to theintra encoding modes to enable the individual selection of thetransformation block size or the N×N prediction mode for each of thecolor components when the intra N×N prediction mode is used (FIG. 16).With a syntax structure as illustrated in FIG. 16, the encoding modeinformation can be made common to the color components while theprediction method can be changed for each of the color components for avideo image of a complicated pattern which requires the N×N prediction.As a result, the prediction efficiency can be enhanced.

Note that the information of the intra encoding mode-sharingidentification flag 33 is not required to be carried on the video bitstream to be transmitted as long as the information is already known toboth the encoding device and the decoding device by some means. In thiscase, for example, the encoding device may fix the intra encodingmode-sharing identification flag 33 to any value for encoding or maytransmit the intra encoding mode-sharing identification flag 33independently of the video bit stream.

3. Outline of Operation of the Decoding Device

The decoding device illustrated in FIG. 12 receives the video streamaccording to the data sequence illustrated in FIG. 15 output from theencoding device illustrated in FIG. 11 and performs a decoding processon the macroblock basis, each macroblock containing three colorcomponents in the same size (the 4:4:4 format), to restore each videoframe.

First, the variable length decoding unit 25 receives the stream 22 as aninput to decode the stream 22 according to a predetermined syntax,thereby extracting information such as the intra encoding mode-sharingidentification flag 33, the quantized transform coefficient 10, theencoding mode 6, and the quantization parameter 21. The quantizedtransform coefficient 10 is input together with the quantizationparameter 21 to the inverse quantization unit 12, where the inversequantization process is performed. Subsequently, the output from theinverse quantization unit 12 is input to the inverse orthogonaltransform unit 13 to be restored to the local decoded predictiondifference signal 14. On the other hand, the encoding mode 6 and theintra encoding mode-sharing identification flag 33 are input to thespatial prediction unit 2 to obtain the predicted image 7 according tothe input information. A specific procedure for obtaining the predictedimage 7 will be described below. The local decoded prediction differencesignal 14 and the predicted image 7 are added by the adder 18 to obtainthe temporary decoded image 15 (which is exactly the same signal as thelocal decoded image 15 in the encoding device). The temporary decodedimage 15 is written back to the memories 16 to be used for the intraprediction of the subsequent macroblocks. Three memories are providedfor the respective color components. Moreover, based on the indicationof the deblocking filter control flag 24 decoded by the variable lengthdecoding unit 25, the deblocking filter 26 is caused to act on thetemporary decoded image 15 to obtain the final decoded image 27.

4. Intra Prediction Decoding Process in the Decoding Device

An intra prediction image generation process which is a characteristicof the decoding device according to the second embodiment of the presentinvention will be described in detail. The process is executed on themacroblock basis, each macroblock being obtained by aggregating thethree color components described above. The process is mainly performedby the variable length decoding unit 25 and the spatial prediction unit2 in the decoding device illustrated in FIG. 12. FIG. 17 is a flowchartillustrating a flow of the process.

In the flowchart illustrated in FIG. 7, Steps S25 to S38 are executed inthe variable length decoding unit 25. A data sequence of the videostream 22 which is input to the variable length decoding unit 25 isaccording to the data sequence illustrated in FIG. 15. In Step S25,among the data illustrated in FIG. 15, the intra encoding mode 0 (34 a)(corresponding to the C0 component) is first decoded. As a result, whenthe intra encoding mode 0 (34 a) is the “intra N×N prediction,” thetransformation block size identification flag 0 (32 a) and the intraprediction mode 0 (35 a) are decoded (Steps S26 and S27). Subsequently,when it is determined based on the state of the intra encodingmode-sharing identification flag 33 that the intra encoding/predictionmode information is common to all the color components, the intraencoding mode 0 (34 a), the transformation block size identificationflag 0 (32 a), and the intra prediction mode 0 (35 a) are set asencoding information used for the C1 and C2 components (Steps S29 andS30). FIG. 17 illustrates a process on the macroblock basis. It isassumed that the intra encoding mode-sharing identification flag 33 usedfor the determination in Step S29 has been read from the video stream 22by the variable length decoding unit 25 at the layer level higher thanthe slice level prior to START in the process in FIG. 17.

When it is determined in Step S29 of FIG. 17 that the intraencoding/prediction mode information is not common to all the colorcomponents, the intra encoding/prediction mode information for the C1and C2 components is decoded in the subsequent process in Steps S31 toS38. Through the process described above, the encoding mode 6 for eachof the color components is determined and is output to the spatialprediction unit 2. Then, according to Steps S39 to S41, the intraprediction image of each color component is obtained. The process forobtaining the intra prediction image follows the procedure illustratedin FIGS. 3, 4, and 13, and is the same as the process executed in theencoding device of FIG. 11.

Note that, as described above, the decoding device is not required toanalyze the value of the information of the intra encoding mode-sharingidentification flag 33 from the video bit stream but may, for example,decode the value of the information of the intra encoding mode-sharingidentification flag 33 with a prefixed value as long as the informationis known in advance to both the encoding device and the decoding deviceby some means. Alternatively, the information of the intra encodingmode-sharing identification flag 33 may be transmitted independently ofthe video bit stream.

In the 4:2:0 format employed in the conventional video encodingstandard, the color space definition is fixed to Y, Cb, and Cr. In the4:4:4 format, however, the color space is not limited to Y, Cb, and Cr,and various color spaces can be used. By constituting the encodinginformation of the intra macroblock as in FIG. 15 or 16, an optimalencoding process can be performed according to the color spacedefinition of the input video signal 1 or the property of the videosignal. At the same time, the bit stream obtained as the result of theabove-mentioned encoding process is uniquely interpreted to perform avideo decoding/reproducing process.

Third Embodiment

The third embodiment of the present invention describes another exampleof the configurations of the encoding device illustrated in FIG. 11 andthe decoding device illustrated in FIG. 12. As in the first embodimentof the present invention, the encoding device and the decoding device ofthe third embodiment are based on the encoding method employed in theMPEG-4 AVC (ISO/IEC 14496-10)/ITU-T H.264 standard corresponding toNon-patent Document 1 and provided with characteristics specific to thepresent invention. The video encoding device of the third embodimentdiffers from that illustrated in FIG. 11 of the second embodiment onlyin the variable length encoding unit 11. The video decoding device ofthe third embodiment differs from the decoding device illustrated inFIG. 12 of the second embodiment only in the variable length decodingunit 25. The remaining operation is the same as that in the secondembodiment, and only differences between the embodiments will bedescribed below.

1. Encoding Procedure of the Intra Prediction Mode Information in theEncoding Device

In the variable length encoding unit 11 of the encoding device of thesecond embodiment of the present invention, the data sequence in the bitstream has been described for the information of the intra N×Nprediction mode. However, an encoding procedure of the intra N×Nprediction mode has not particularly been described. In the thirdembodiment of the present invention, a specific method of the encodingprocedure will be described. The third embodiment is particularlycharacteristic in that the case where the values of the intra N×Nprediction modes have a high correlation between the color components istaken into consideration to perform entropy-coding using the correlationin value between the color components for the intra N×N prediction modeobtained for each of the color components.

The following description is premised on the bit stream sequence in theform illustrated in FIG. 16. For the simplification of the description,a value of the intra encoding mode-sharing identification flag 33 is setto “use a common intra encoding mode for C0, C1, and C2,” and the intraencoding mode is set to the intra N×N prediction mode, and thetransformation block sizes 0 to 2 are set to the 4×4 block. In thiscase, the intra prediction modes 0 to 2 (35 a to 35 c) are all the intra4×4 prediction mode. In FIGS. 18 to 20, a current macroblock to beencoded is denoted by X. A macroblock on the left of the macroblock X isdenoted by A, whereas a macroblock above the macroblock X is denoted byB.

As the drawings for illustrating the respective encoding procedures ofthe color components C0, C1, and C2, FIGS. 18 to 20 are employed. FIGS.21 and 22 are flowcharts of the encoding procedures.

FIG. 18 illustrate states of the C0 component in the macroblock X. Inthis drawing, a 4×4 block to be encoded is referred to as block X, and ablock on the left of and a block above the block X are respectivelyreferred to as block A and block B. There are two cases according to theposition of the 4×4 block to be encoded in the macroblock X. Case 1shows that the 4×4 blocks on the left of and above the 4×4 block to beencoded are present outside the current macroblock X, that is, arecontained in the macroblock A or B. Case 2 shows that the 4×4 blocks onthe left of and above the 4×4 block to be encoded are present in thecurrent macroblock X, that is, are contained in the macroblock X. In anyof the cases, one intra 4×4 prediction mode is allocated to each of the4×4 blocks in the macroblock X, and is referred to as CurrIntraPredMode.The intra 4×4 prediction mode of the block A is referred to asIntraPredModeA, whereas the intra 4×4 prediction mode of the block B isreferred to as IntraPredModeB. Both IntraPredModeA and IntraPredModeBare information which have already been encoded at the time when theblock X is encoded. For encoding the intra 4×4 prediction mode of acertain block X, the parameters described above are first allocated(Step S50 of FIG. 21).

Next, a prediction value, predCurrIntraPredMode, for CurrIntraPredModeof the block X is determined by the following Formula (Step S51).

predCurrIntraPredMode=Min(IntraPredModeA, IntraPredModeB)

Next, CurrIntraPredMode of the C0 component is encoded. In this case,when CurrIntraPredMode=predCurrIntraPredMode is established, a one-bitflag (prev_intra_pred_mode_flag) indicating that the value is the sameas the prediction value is encoded. IfCurrIntraPredMode!=predCurrIntraPredMode is established,CurrIntraPredMode is encoded as it is when CurrIntraPredMode is smallerthan predCurrIntraPredMode as a result of the comparison betweenCurrIntraPredMode and predCurrIntraPredMode. When CurrIntraPredMode islarger than predCurrIntraPredMode, CurrIntraPredMode−1 is encoded (StepS52).

if(CurrIntraPredMode == predCurrIntraPredMode) {  prev_intra_pred_mode_flag = 1; } else {   prev_intra_pred_mode_flag =0;   if( CurrIntraPredMode < predCurrIntraPredMode)   rem_intra_pred_mode = CurrIntraPredMode;   else   rem_intra_pred_mode = CurrIntraPredMode − 1; } Encodeprev_intra_pred_mode_flag; If(prev_intra_pred_mode_flag == 0)  Encoderem_intra_pred_mode;

Next, the encoding procedure of the C1 component will be describedreferring to FIG. 19. First, as in the case of the encoding procedure ofthe C0 component, the encoding parameters of the neighboring blocks suchas IntraPredModeA and IntraPredModeB are set according to the positionof the block X (Step S53).

Next, a prediction value candidate 1 predCurrIntraPredModel forCurrIntraPredMode of the block X is defined by the following Formula(Step S54).

predCurrIntraPredMode1=Min(IntraPredModeA, IntraPredModeB)

If prev_intra_pred_mode_flag=1 is established for the C0 component, thispredCurrIntraPredMode1 is employed as predCurrIntraPredMode for theblock X of the C1 component. The reason is as follows. The employment ofprev_intra_pred_mode_flag=1 for the same block position of the C0component means a high correlation between the prediction modes in theneighboring image areas in the C0 component. In a case of an RGB signalin which the correlation in texture structure between the C0 componentand the C1 component is not completely removed, for example, there is apossibility of a high correlation between the neighboring image areas inthe C1 component as in the case of the C0 component. Therefore, it isdetermined that a prediction value of the C1 component does not dependon the intra 4×4 prediction mode of the C0 component.

On the other hand, when prev_intra_pred_mode_flag=0, that is,rem_intra_pred_mode is encoded in the C0 component (Step S55),CurrIntraPredMode of the C0 component is determined as a predictionvalue candidate 2 (Step S56). Specifically,predCurrIntraPredMode2=CurrIntraPredMode_C0 is established. Thebackground of the determination of the prediction value candidate is asfollows. The encoding of rem_intra_pred_mode for the C0 component meansthat a correlation in intra prediction between the neighboring imageareas is low in the C0 component. In this case, it is expected that acorrelation between the neighboring image areas is also low in the C1component. Therefore, there is a possibility that the intra predictionmode of the block at the same position in a different color componentprovides a more accurate prediction value.

As the prediction value of CurrIntraPredMode of the block X of the C1component, any one of predCurrIntraPredMode1 and predCurrIntraPredMode2is ultimately determined (Step S57). The determination of the value isadditionally encoded as a one-bit flag (pred_flag). However, pred_flagis encoded only when CurrIntraPredMode is identical with the predictionvalue. When CurrIntraPredMode is not identical with the prediction value(rem_intra_pred_mode is encoded), predCurrIntraPredMode1 is used as theprediction value.

The procedure described above is as follows:

if( prev_intra_pred_mode_flag_C0 == 1 ) {  predCurrIntraPredMode = Min(IntraPredModeA, IntraPredModeB ); } else {   predCurrIntraPredMode1 =Min( IntraPredModeA,   IntraPredModeB );   predCurrIntraPredMode2 =CurrIntraPredMode_C0;   if( CurrIntraPredMode == predCurrIntraPredMode1)   {    prev_intra_pred_mode_flag = 1;    pred_flag = 0; // theprediction value candidate 1 is used   }   else if(CurrIntraPredMode ==predCurrIntraPredMode2 ) {    prev_intra_pred_mode_flag = 1;   pred_flag = 1; // the prediction value candidate 1 is used   }   else{  prev_intra_pred_mode_flag = 0;    if( CurrIntraPredMode <predCurrIntraPredMode1 )     rem_intra_pred_mode = CurrIntraPredMode;   else     rem_intra_pred_mode = CurrIntraPredMode − 1; } } Encodeprev_intra_pred_mode_flag ; if(prev_intra_pred_mode_flag == 1)  Encodepred_flag; else // If(prev_intra_pred_mode_flag == 0)  Encoderem_intra_pred_mode ;As a result, prev_intra_pred_mode_flag, pred_flag, andrem_intra_pred_mode are encoded as encoded data (Step S58).

Next, the encoding procedure of the C2 component will be describedreferring to FIG. 20. First, as in the case of the C0 and C1 components,the encoding parameters of the neighboring blocks such as IntraPredModeAand IntraPredModeB are set according to the position of the block X(Step S59).

Next, the prediction value candidate 1, predCurrIntraPredMode1 forCurrIntraPredMode of the block X is defined by the following Formula(Step S60).

predCurrIntraPredMode1=Min(IntraPredModeA, IntraPredModeB)

If prev_intra_pred_mode_flag=1 is established for both the C0 and C1components, this predCurrIntraPredMode1 is used as it is aspredCurrIntraPredMode for the block X of the C2 component. The reason isas follows. The use of prev_intra_pred_mode_flag=1 for the blocks at thesame position in the C0 and C1 components means a high correlationbetween the prediction modes in the neighboring image areas in the C0and C1 components. In the case of, for example, the RGB signal in whichthe correlation in the texture structure between the C0 and C1components, and the C2 component is not completely removed, there is apossibility of a high correlation between the neighboring image areas inthe C2 component as in the cases of the C0 and C1 components. Therefore,it is determined that the prediction value of the C2 component does notdepend on the intra 4×4 prediction mode of the C0 and C1 components.

On the other hand, when prev_intra_pred_mode_flag=0, that is,rem_intra_pred_mode is encoded in the C0 component or C1 (Step S61),CurrIntraPredMode of the C0 component or C1 is determined as theprediction value candidate 2 (Step S62). Specifically, the procedure isas follows:

If( prev_intra_pred_mode_flag_C0 == 0 && pred_intra_pred_mode_flag_C1 ==1 ) predCurrIntraPredMode2 = CurrIntraPredMode_C0;else   if(prev_intra_pred_mode_flag_C0   ==   1   &&pred_intra_pred_mode_flag_C1  == 0  )predCurrIntraPredMode2  =CurrIntraPredMode_C1; else predCurrIntraPredMode2 =CurrIntraPredMode_C1;The background of the determination of the prediction value candidate isas follows. The encoding of rem_intra_pred_mode for the C0 component orC1 means that a correlation in the intra prediction between theneighboring image areas is low in the C0 component or C1. In this case,it is expected that a correlation between the neighboring image areas isalso low even in the C2 component. Therefore, there is a possibilitythat the intra prediction mode of the block at the same position in adifferent color component may provide a more accurate prediction value.Moreover, according to this view, when rem_intra_pred_mode is encodedfor both the C0 and C1 components, any of the current intra predictionmodes of the C0 and C1 components can be a prediction value candidate.In this case, the current intra prediction mode of the C1 component isused as the prediction value. The reason is as follows. When a YUV colorspace is input, there is a high possibility that C0 is treated as aluminance whereas C1 and C2 are treated as chrominances. In this case,the prediction mode of C1 rather than that of C0 is considered to becloser to the prediction mode of C2. When the RGB color space is input,it is generally considered that the selection from C0 and C1 does notconstitute such an important factor, and therefore, it is appropriate touse the intra prediction mode of the C1 component as the predictionvalue (the intra prediction mode of the C2 component may also be used asthe prediction value depending on the design).

As the prediction value for CurrIntraPredMode of the block X of the C2component, any one of predCurrIntraPredMode 1 and predCurrIntraPredMode2is ultimately determined (Step S63). The determination of the value isadditionally encoded as the one-bit flag (pred_flag).

The above-mentioned procedure is described as the following Formula.

The procedure described above is as follows:

If( prev_intra_pred_mode_flag_C0 == 1 && prev_intra_pred_mode_flag == 1) {  predCurrIntraPredMode = Min( IntraPredModeA, IntraPredModeB ); }else {   predCurrIntraPredMode1 = Min( IntraPredModeA, IntraPredModeB );If( prev_intra_pred_mode_flag_C0 == 0 && pred_intra_pred_mode_flag_C1 ==1 ) predCurrIntraPredMode2 = CurrIntraPredMode_C0;else   if(prev_intra_pred_mode_flag_C0   ==   1   &&pred_intra_pred_mode_flag_C1  == 0  )predCurrIntraPredMode2  =CurrIntraPredMode_C1; else predCurrIntraPredMode2 =CurrIntraPredMode_C1;   if( CurrIntraPredMode == predCurrIntraPredMode1)   {     prev_intra_pred_mode_flag = 1;     pred_flag = 0; // theprediction value cabdidate 1 is used   }   else if(CurrIntraPredMode ==predCurrIntraPredMode2 ) {     prev_intra_pred_mode_flag = 1;    pred_flag = 1; // the prediction value cabdidate 2 is used   }  else {  prev_intra_pred_mode_flag = 0;    if( CurrIntraPredMode <predCurrIntraPredMode1 )     rem_intra_pred_mode = CurrIntraPredMode;   else     rem_intra_pred_mode = CurrIntraPredMode − 1; } } Encodeprev_intra_pred_mode_flag ; if(prev_intra_pred_mode_flag == 1)  Encodepred_flag; else // If(prev_intra_pred_mode_flag == 0)  Encoderem_intra_pred_mode ;As a result, prev_intra_pred_mode_flag, pred_flag, andrem_intra_pred_mode are encoded as encoded data (Step S64).

The above-mentioned encoding procedure can be similarly defined for theintra 8×8 prediction mode. By encoding the intra N×N prediction mode inthe procedure as described above, the correlation between the predictionmode selected for one color component and that selected for anothercolor component can be used to reduce the amount of codes of theprediction mode itself, thereby improving the encoding efficiency.

The only difference between FIGS. 21 and 22 lies in that the process ofencoding the intra prediction mode per macroblock is separatelyperformed for each color component or collectively performed for thecolor components. In the case of FIG. 21, each color component isencoded for each 4×4 block. Sixteen patterns of the encoded 4×4 blockare arranged as a bit stream (Step S65). In the case of FIG. 22, sixteen4×4 blocks of each color component are encoded at a time. The encoded4×4 blocks are arranged as a bit stream for each color component (StepsS66, S67 and S68).

Note that in the above-mentioned procedure, pred_flag is determined asvalid information only when prev_intra_pred_mode_flag is 1. However,pred_flag can be determined as effective information even whenprev_intra_pred_mode_flag is 0. Specifically, for example, taking the C1component as an example, the encoding may also be performed in thefollowing procedure.

If( prev_intra_pred_mode_flag_C0 == 1 ) {  predCurrIntraPredMode = Min(IntraPredModeA, IntraPredModeB ); if( CurrIntraPredMode ==predCurrIntraPredMode )   {     prev_intra_pred_mode_flag = 1;   }  Else{    if( CurrIntraPredMode < predCurrIntraPredMode )    rem_intra_pred_mode = CurrIntraPredMode;    else    rem_intra_pred_mode = CurrIntraPredMode − 1;   } } else {  predCurrIntraPredMode1 = Min( IntraPredModeA,   IntraPredModeB );  predCurrIntraPredMode2 = CurrIntraPredMode_C0; if(CurrIntraPredMode == predCurrIntraPredMode1 ) {    prev_intra_pred_mode_flag = 1;     pred_flag = 0; // the predictionvalue cabdidate 1 is used } else if(CurrIntraPredMode ==predCurrIntraPredMode2 ) {     prev_intra_pred_mode_flag = 1;    pred_flag = 1; // the prediction value cabdidate 2 is used } else {prev_intra_pred_mode_flag = 0; if( | CurrIntraPredMode −predCurrIntraPredMode1 | <     |CurrIntraPredMode predCurrIntraPredMode2 | ) {    pred_flag = 0;   predCurrIntraPredMode = predCurrIntraPredMode1; } Else {    pred_flag= 1;    predCurrIntraPredMode = predCurrIntraPredMode2; }     if(CurrIntraPredMode < predCurrIntraPredMode )     rem_intra_pred_mode =CurrIntraPredMode;     else     rem_intra_pred_mode = CurrIntraPredMode− 1;   } } Encode prev_intra_pred_mode_flag ;If(prev_intra_pred_mode_flag_C0 == 0) Encode pred_flag;If(prev_intra_pred_mode_flag == 0)  Encode rem_intra_pred_mode ;

According to this method, pred_flag is encoded each time whenrem_intra_pred_mode is encoded in the intra prediction mode of the sameposition block of the C0 component. Even in a case ofprev_intra_pred_mode_flag=0, a more accurate prediction value can beused. As a result, the encoding efficiency is expected to be improved.As a further variation, pred_flag may be encoded without depending onwhether or not rem_intra_pred_mode is encoded in the intra predictionmode of the same position block of the C0 component. In this case, theintra prediction mode of the C0 component is always used as theprediction value candidate.

Specifically, in this case, Formula is established as follows.

 predCurrIntraPredMode1 = Min( IntraPredModeA, IntraPredModeB ); predCurrIntraPredMode2 = CurrIntraPredMode_C0; if( CurrIntraPredMode ==predCurrIntraPredMode1 ) {    prev_intra_pred_mode_flag = 1;   pred_flag = 0; // the prediction value candidate 1 is used } elseif(CurrIntraPredMode == predCurrIntraPredMode2 ) {   prev_intra_pred_mode_flag = 1;    pred_flag = 1; // the predictionvalue candidate 2 is used } else { prev_intra_pred_mode_flag = 0; if( |CurrIntraPredMode − predCurrIntraPredMode1 | <    |CurrIntraPredMode predCurrIntraPredMode2 | ) {   pred_flag = 0;  predCurrIntraPredMode = predCurrIntraPredMode1; } Else {   pred_flag =1;   predCurrIntraPredMode = predCurrIntraPredMode2; }    if(CurrIntraPredMode < predCurrIntraPredMode )     rem_intra_pred_mode =CurrIntraPredMode;    else     rem_intra_pred_mode = CurrIntraPredMode −1;  } Encode prev_intra_pred_mode_flag ; Encode pred_flag;If(prev_intra_pred_mode_flag == 0)   Encode rem_intra_pred_mode ;

Alternatively, pred_flag may be set for each macroblock or sequenceinstead of for each 4×4 block. When pred_flag is set for eachmacroblock, the use of the prediction value candidate 1 or theprediction value candidate 2 is common to all the 4×4 blocks in themacroblock. Therefore, overhead information transmitted as pred_flag canbe further reduced. Moreover, pred_flag may be set for each sequence inorder to determine the use of the prediction value candidate 1 or 2according to the definition of the input color space. In this case,since pred_flag is no longer required to be transmitted for eachmacroblock, the overhead information can be further reduced.

2. Decoding Procedure of the Intra Prediction Mode Information in theDecoding Device

For the variable length decoding unit 25 in the decoding device in thesecond embodiment of the present invention, the data sequence in the bitstream is illustrated for the information of the intra N×N predictionmode. However, a decoding procedure of the information is notparticularly described. In the third embodiment of the presentinvention, a specific method of the decoding procedure will bedescribed. The third embodiment of the present invention is particularlycharacteristic in the decoding of the bit stream which is entropy-codedusing the correlation in value between the color components, for theintra N×N prediction mode obtained for each of the color components,taking a case where the values of the intra N×N prediction modes have ahigh correlation between the color components into consideration.

The following description is premised on the bit stream sequence in theform illustrated in FIG. 16. In order to limit the description to thatfor the decoding procedure in the intra prediction mode, a value of theintra encoding mode-sharing identification flag 33 is set to “use acommon intra encoding mode for C0, C1, and C2.” In addition, the intraencoding mode is set to the intra N×N prediction mode, and the 4×4 blocksize is designated as the transformation block sizes 0 to 2. In thiscase, the intra prediction modes 0 to 2 (35 a to 35 c) are all the intra4×4 prediction mode. As in the case of the encoding device, FIGS. 18 to20 are referred to for the description of the decoding device. In thedecoding device, a current macroblock to be decoded is denoted by X. Amacroblock on the left of the macroblock X is denoted by A, whereas amacroblock above the macroblock X is denoted by B. FIG. 23 is aflowchart of the decoding procedure. In each of the steps in FIG. 23denoted by the same reference numerals as those in FIGS. 21 and 22, thesame process as that in the encoding device is performed.

FIG. 18 illustrate states of the C0 component in the macroblock X. Thereare two cases according to the position of the 4×4 block to be decodedin the macroblock X. Case 1 corresponds to a case where the 4×4 blockson the left of and above the 4×4 block to be decoded are present outsidethe current macroblock X, that is, contained in the macroblock A or B.Case 2 corresponds to the other case where the 4×4 blocks on the left ofand above the 4×4 block to be decoded are present in the currentmacroblock X, that is, contained in the macroblock X. The 4×4 block tobe decoded is referred to as block X, and the 4×4 blocks on the left ofand above the block X are respectively referred to as block A and blockB. In any of the cases, one intra 4×4 prediction mode is allocated toeach of the 4×4 blocks X in the macroblock X, and is referred to asCurrIntraPredMode. The intra 4×4 prediction mode of the block A isreferred to as IntraPredModeA, whereas the intra 4×4 prediction mode ofthe block B is referred to as IntraPredModeB. Both IntraPredModeA andIntraPredModeB are information which have already been decoded at thetime when the block X is decoded. For decoding the intra 4×4 predictionmode of a certain block X, the parameters described above are firstallocated (Step S50).

Next, a prediction value, predCurrIntraPredMode, for CurrIntraPredModeof the block X is determined by the following Formula (Step S51).

predCurrIntraPredMode=Min(IntraPredModeA, IntraPredModeB)

Next, the one-bit flag (prev_intra_pred_mode_flag) indicating whether ornot CurrIntraPredMode=predCurrIntraPredMode is established is decoded.The establishment of the relation: prev_intra_pred_mode_flag=1 meansthat CurrIntraPredMode=predCurrIntraPredMode is established. Otherwise(prev_intra_pred_mode_flag=0), information of rem_intra_pred_mode isdecoded from the bit stream. When rem_intra_pred_mode is smaller thanpredCurrIntraPredMode as the result of comparison between the twovalues, CurrIntraPredMode=rem_intra_pred_mode is set. Otherwise,CurrIntraPredMode=rem_intra_pred_mode+1 is set (Step S65).

The above-mentioned procedure is summarized as follows.

predCurrIntraPredMode = Min( IntraPredModeA, IntraPredModeB ); Decodeprev_intra_pred_mode_flag; if(prev_intra_pred_mode_flag == 1) { CurrIntraPredMode == predCurrIntraPredMode; } else {  Decoderem_intra_pred_mode;  if(rem_intra_pred_mode < predCurrIntraPredMode )  CurrIntraPredMode = rem_intra_pred_mode;  else   CurrIntraPredMode =rem_intra_pred_mode + 1; }

Next, the decoding procedure of the C1 component will be describedreferring to FIG. 19. First, as in the case of the C0 component, theencoding parameters of the neighboring blocks such as IntraPredModeA andIntraPredModeB are set according to the position of the block X (StepS53).

Next, the prediction value candidate 1, predCurrIntraPredMode1, for theCurrIntraPredMode of the block X is defined by the following Formula(Step S54).

predCurrIntraPredMode1=Min(IntraPredModeA, IntraPredModeB)

If prev_intra_pred_mode_flag=1 is established for the C0 component, thispredCurrIntraPredMode1 is used as predCurrIntraPredMode of the block Xof the C1 component. The reason is the same as that described for theencoding device.

On the other hand, when prev_intra_pred_mode_flag=0, that is,rem_intra_pred_mode is decoded for the C0 component (Step S55),CurrIntraPredMode for the C0 component is determined as the predictionvalue candidate 2 (Step S56). Specifically,predCurrIntraPredMode2=CurrIntraPredMode_C0 is established. The reasonfor setting CurrIntraPredMode as the predictive value candidate is alsothe same as that described for the encoding device.

As the prediction value of CurrIntraPredMode of the block X of the C1component, any one of predCurrIntraPredMode1 and predCurrIntraPredMode 2is ultimately determined (Step S57). The selection of the value isdetermined by decoding the one-bit flag (pred_flag). However, pred_flagis decoded only when CurrIntraPredMode is identical with the predictionvalue. When CurrIntraPredMode is not identical with the prediction value(rem_intra pred_mode is decoded), predCurrIntraPredMode 1 is used as theprediction value.

After the prediction values 1 and 2, prev_intra_pred_mode_flag,pred_flag, and rem_intra_pred_mode are given, CurrIntraPredMode isdecoded in the following procedure (Step S66).

if( prev_intra_pred_mode_flag_C0 == 1 ) {  pred_flag = 0; // At thistime, pred_flag is not included in a bit stream  predCurrIntraPredMode =Min( IntraPredModeA, IntraPredModeB );   Decodeprev_intra_pred_mode_flag;   if(prev_intra_pred_mode_flag == 1)   {   CurrIntraPredMode == predCurrIntraPredMode;   } else   {    Decoderem_intra_pred_mode;    if(rem_intra_pred_mode < predCurrIntraPredMode )    CurrIntraPredMode = rem_intra_pred_mode;    else    CurrIntraPredMode = rem_intra_pred_mode + 1;   } } else {  predCurrIntraPredMode1 = Min( IntraPredModeA,   IntraPredModeB );  predCurrIntraPredMode2 = CurrIntraPredMode_C0;   Decodeprev_intra_pred_mode_flag;   if(prev_intra_pred_mode_flag == 1)   {   Decode pred_flag; If( pred_flag == 0 )      predCurrIntraPredMode =predCurrIntraPredMode1;    Else      predCurrIntraPredMode =predCurrIntraPredMode2;    CurrIntraPredMode == predCurrIntraPredMode;  } else   {    predCurrIntraPredMode = predCurrIntraPredMode1;   Decode rem_intra_pred_mode;    if(rem_intra_pred_mode <predCurrIntraPredMode )     CurrIntraPredMode = rem_intra_pred_mode;   else     CurrIntraPredMode = rem_intra_pred_mode + 1;   } }

Next, the decoding procedure of the C2 component will be describedreferring to FIG. 20. First, as in the cases of the C0 and C1components, the encoding parameters of the neighboring blocks such asIntraPredModeA and IntraPredModeB are set according to the position ofthe block X (Step S59).

Next, the prediction value candidate 1, predCurrIntraPredMode1, forCurrIntraPredMode of the block X is defined by the following Formula(Step S60).

predCurrIntraPredMode1=Min(IntraPredModeA, IntraPredModeB)

If prev_intra_pred_mode_flag=1 is established for both the C0 and C1components, this predCurrIntraPredMode1 is used as predCurrIntraPredModeof the block X of the C2 component. The reason is the same as thatdescribed for the encoding device.

On the other hand, when prev_intra_pred_mode_flag=0, that is,rem_intra_pred_mode is decoded for the C0 component or C1 (Step S61),CurrIntraPredMode for the C0 component or C1 is determined as theprediction value candidate 2 (Step S62).

Specifically, the procedure is as follows:

If( prev_intra_pred_mode_flag_C0 == 0 && pred_intra_pred_mode_flag_C1 ==1 ) predCurrIntraPredMode2 = CurrIntraPredMode_C0;else   if(prev_intra_pred_mode_flag_C0   ==   1   &&pred_intra_pred_mode_flag_C1  == 0  )predCurrIntraPredMode2  =CurrIntraPredMode_C1; else predCurrIntraPredMode2 =CurrIntraPredMode_C1;The background of the determination of the prediction value candidate 2is also the same as that described for the encoding device.

As the prediction value of CurrIntraPredMode of the block X of the C2component, any one of predCurrIntraPredMode1 and predCurrIntraPredMode 2is ultimately determined (Step S63). The value is determined by decodingthe one-bit flag (pred_flag). However, pred_flag is decoded only whenCurrIntraPredMode is identical with the prediction value. Otherwise(when rem_intra_pred_mode is decoded), predCurrIntraPredMode1 is used asthe prediction value.

After the prediction value candidates 1 and 2,prev_intra_pred_mode_flag, pred_flag, and rem_intra_red_mode are given,CurrIntraPredMode is decoded in the following procedure (Step S71).

if(prev_intra_pred_mode_flag_C0 == 1 && prev_intra_pred_mode_flag_C1 ==1 ) {  pred_flag = 0; // At this time, pred_flag is not included in abit stream  predCurrIntraPredMode = Min( IntraPredModeA, IntraPredModeB);   Decode prev_intra_pred_mode_flag;   if(prev_intra_pred_mode_flag== 1)   {    CurrIntraPredMode == predCurrIntraPredMode;   } else   {   Decode rem_intra_pred_mode;    if(rem_intra_pred_mode <predCurrIntraPredMode )     CurrIntraPredMode = rem_intra_pred_mode;   else     CurrIntraPredMode = rem_intra_pred_mode + 1;   } } else {  predCurrIntraPredMode1 = Min( IntraPredModeA,   IntraPredModeB ); If(prev_intra_pred_mode_flag_C0 == 0 && pred_intra_pred_mode_flag_C1 == 1 )predCurrIntraPredMode2 = CurrIntraPredMode_C0;else   if(prev_intra_pred_mode_flag_C0   ==   1   &&pred_intra_pred_mode_flag_C1  == 0  )predCurrIntraPredMode2  =CurrIntraPredMode_C1; else predCurrIntraPredMode2 =CurrIntraPredMode_C1;   Decode prev_intra_pred_mode_flag;  if(prev_intra_pred_mode_flag == 1)   {    Decode pred_flag; If(pred_flag == 0 )      predCurrIntraPredMode = predCurrIntraPredMode1;   Else      predCurrIntraPredMode = predCurrIntraPredMode2;     CurrIntraPredMode == predCurrIntraPredMode;     } else     {     predCurrIntraPredMode = predCurrIntraPredMode1;      Decoderem_intra_pred_mode;      if(rem_intra_pred_mode < predCurrIntraPredMode)       CurrIntraPredMode = rem_intra_pred_mode;      else      CurrIntraPredMode = rem_intra_pred_mode + 1;     } }

The decoding procedure described above can be similarly defined for theintra 8×8 prediction mode. By decoding the intra N×N prediction mode inthe procedure as described above, the correlation between the predictionmode selected for one color component and that selected for anothercolor component can be used to reduce the amount of codes of theprediction mode itself, thereby decoding the bit stream with theimproved encoding efficiency.

Note that pred_flag is information which is decoded only whenprev_intra_pred_mode_flag is 1 in the above-mentioned procedure, butpred_flag may be decoded as information to be included even in a casewhere prev_intra_pred_mode_flag is 0.

Specifically, for example, taking the C1 component as an example, thedecoding may also be performed in the following procedure.

if( prev_intra_pred_mode_flag_C0 == 1 ) {  predCurrIntraPredMode = Min(IntraPredModeA, IntraPredModeB );   Decode prev_intra_pred_mode_flag;  if(prev_intra_pred_mode_flag == 1)   {    CurrIntraPredMode ==predCurrIntraPredMode;   } else   {    Decode rem_intra_pred_mode;   if(rem_intra_pred_mode < predCurrIntraPredMode )    CurrIntraPredMode = rem_intra_pred_mode;    else    CurrIntraPredMode = rem_intra_pred_mode + 1;   } } else {  predCurrIntraPredMode1 = Min( IntraPredModeA,   IntraPredModeB );  predCurrIntraPredMode2 = CurrIntraPredMode_C0;   Decodeprev_intra_pred_mode_flag;   Decode pred_flag; If( pred_flag == 0 )   predCurrIntraPredMode = predCurrIntraPredMode1;   Else   predCurrIntraPredMode = predCurrIntraPredMode2;  if(prev_intra_pred_mode_flag == 1)   {    CurrIntraPredMode ==predCurrIntraPredMode;   } else   {    Decode rem_intra_pred_mode;   if(rem_intra_pred_mode < predCurrIntraPredMode )    CurrIntraPredMode = rem_intra_pred_mode;    else    CurrIntraPredMode = rem_intra_pred_mode + 1;   } }

The effects of the method are as described for the correspondingencoding procedure performed in the encoding device. As a furthervariation, pred_flag may be decoded without depending on whether or notrem_intra_pred_mode is decoded in the intra prediction mode of the sameposition block of the C0 component. In this case, the intra predictionmode for the C0 component is always used as the prediction valuecandidate.

Specifically, the procedure is as follows:

 predCurrIntraPredMode1 = Min( IntraPredModeA, IntraPredModeB ); predCurrIntraPredMode2 = CurrIntraPredMode_C0;  Decodeprev_intra_pred_mode_flag;  Decode pred_flag; If( pred_flag == 0 )  predCurrIntraPredMode = predCurrIntraPredMode1;  Else  predCurrIntraPredMode = predCurrIntraPredMode2; if(prev_intra_pred_mode_flag == 1)  {   CurrIntraPredMode ==predCurrIntraPredMode;  } else  {   Decode rem_intra_pred_mode;  if(rem_intra_pred_mode < predCurrIntraPredMode )    CurrIntraPredMode= rem_intra_pred_mode;   else    CurrIntraPredMode =rem_intra_pred_mode + 1; }

Note that, as described for the encoding device, pred_flag may be setfor each macroblock or sequence instead of for each 4×4 block, includedin the bit stream. When pred_flag is set for each macroblock, the use ofthe prediction value candidate 1 or the prediction value candidate 2 iscommon to all the 4×4 blocks in the macroblock. Therefore, overheadinformation of pred_flag to be decoded is further reduced. Moreover,pred_flag can be set for each sequence in order to determine the use ofthe prediction value candidate 1 or 2 according to the definition of theinput color space. In this case, since pred_flag is no longer requiredto be transmitted for each macroblock, the overhead information can befurther reduced.

Fourth Embodiment

The bit stream in the form illustrated in FIG. 16 has been described inthe second embodiment of the present invention. The second embodiment ofthe invention describes that, when the intra encoding mode indicates“intra N×N prediction,” the respective intra prediction modes of thecolor components C0, C1, and C2 are recognized as the intra 4×4prediction mode or the intra 8×8 prediction mode according to the valuesof the transformation block size identification flags 0 to 2 (32 a to 32c). In the fourth embodiment of the present invention, the bit streamsequence is changed to transmit intra prediction mode indication flags 1and 2 (36 a and 36 b) at the sequence level for the C1 and C2components, as illustrated in FIG. 24. The intra prediction modeindication flag is valid when the intra N×N prediction mode is selectedas the intra encoding mode and the transformation block sizeidentification flag indicates the 4×4 block transform, specifically, inthe intra 4×4 prediction mode. According to the value of the intraprediction mode indication flag, switching can be performed between thefollowing two states.

-   State 1: for the C1 or C2 component, the intra 4×4 prediction mode    to be used is individually selected from the nine modes illustrated    in FIG. 3 for encoding.-   State 2: for the C1 or C2 component, the intra 4×4 prediction mode    to be used is limited to the DC prediction, specifically,    intra4×4_pred_mode=2 of FIG. 3 not to encode the intra prediction    mode information.

For example, when the encoding is performed in the color space asdefined by Y, Cb, and Cr, the 4×4 block corresponds to an extremelysmall image area in a case of a high-resolution video image such as thatfor an HDTV or at a higher resolution level. In this case, the encodingis sometimes more efficiently performed by fixing the prediction modeinformation itself to one without transmitting the prediction modeinformation corresponding to the overhead information than by providingthe nine prediction mode options, in particular, for the component whichdoes not maintain the texture structure of the image such as thecomponents Cb and Cr. Such a bit stream sequence enables the optimalencoding according to the properties of an input color space or thecharacteristics of a video image.

The decoding device which receives the bit stream in the formillustrated in FIG. 24 is configured to decode the intra prediction modeindication flag (36 a or 36 b) in the variable length decoding unit 25and then to identify whether the bit stream has been encoded in thestate 1 or 2 depending on a value of the flag. Depending on theidentified state, for the C1 or C2 component, it is determined whetherthe intra 4×4 prediction mode is decoded from the bit stream for theuse, or the DC prediction, that is, intra4×4_pred_mode=2 of FIG. 3 isfixedly used.

Moreover, in the fourth embodiment of the present invention, the intraprediction mode to be used is limited to: intra4×4_pred_mode=2 for theC1 or C2 component in the state 2. However, as long as the number ofprediction mode information is fixed to one, the intra prediction may befixed to another prediction mode in the state 2. Moreover, the state 2may be defined to use the intra 4×4 prediction mode of the C0 componentfor the C1 or C2 component. Since the intra 4×4 prediction mode is notrequired to be encoded for the C1 or C2 component even in this case,overhead bits can be reduced.

Fifth Embodiment

The fifth embodiment of the present invention describes another exampleof the configurations of the encoding device illustrated in FIG. 11 andthe decoding device illustrated in FIG. 12. As in the cases of the otherembodiments described above, the encoding device and the decoding devicein the fifth embodiment of the invention are provided withcharacteristics specific to the present invention based on the encodingmethod employed in the MPEG-4 AVC (ISO/IEC14496-10)/ITU-T H.264 standardcorresponding to Non-patent Document 1 cited above. The video encodingdevice in the fifth embodiment of the invention differs from theencoding device of FIG. 11 described in the second and third embodimentsof the invention only in the operation of the variable length encodingunit 11. The video decoding device in the fifth embodiment of theinvention differs from the decoding device of FIG. 12 described in thesecond and third embodiments of the invention only in the operation ofthe variable length decoding unit 25. The remaining operation is thesame as that in the second and third embodiments of the invention, andonly differences with the above-mentioned embodiments will be describedbelow.

1. Encoding Procedure of the Intra Prediction Mode Information in theEncoding Device

In the encoding device in the third embodiment of the present invention,the specific encoding method of the intra N×N prediction mode in thevariable length encoding unit 11 has been described for the bit streamin the form illustrated in FIG. 16. In the fifth embodiment of thepresent invention, another specific method of the encoding procedurewill be described. The fifth embodiment of the invention ischaracterized in that the following adaptive prediction method isprovided. This method focuses attention on a value of the intra N×Nprediction mode, which reflects the texture structure as an imagepattern, to perform an adaptive prediction for the neighboring pixelareas of the same color component. The following description is premisedon the bit stream sequence in the form illustrated in FIG. 16. In thefifth embodiment of the invention, the intra N×N prediction modeinformation of each of the color components C0, C1, and C2 isindependently encoded, and the encoding method for the C0 colorcomponent is similarly applied to the color C1 and C2 components.Therefore, for the simplification of the description, only the encodingmethod for the C0 color component will be described. The value of theintra encoding mode-sharing identification flag 33 is set to “use acommon intra encoding mode for C0, C1, and C2,” and the intra encodingmode is the intra N×N prediction mode and the transformation block sizeidentification flags 0 to 2 (32 a to 32 c) are the 4×4 block. In thiscase, all the intra-prediction modes 0 to 2 (35 a to 35 c) are the intra4×4 prediction mode. As the drawings for illustrating the encodingprocedure of the intra N×N prediction mode information of the C0component, FIG. 18 are used. In FIG. 18, a current macroblock to beencoded is denoted by X. A macroblock on the left of the macroblock X isdenoted by A, whereas a macroblock above the macroblock X is denoted byB. FIG. 25 is a flowchart of the encoding procedure.

In the third embodiment of the present invention, the smaller value ofIntraPredModeA and IntraPredModeB is uniquely allocated as theprediction value, predCurrIntraPredMode, for the intra 4×4 predictionmode, CurrIntraPredMode, which is allocated to each 4×4 block X in FIG.18. This method is employed in the current AVC/H.264 standard. Accordingto this method, as the value of the intra N×N prediction mode increases,the prediction image generating method is operated in a complicated modewith pixel interpolation in consideration of the directionality of theimage pattern. This complication results from the fact that a smallvalue is allocated to the mode which is highly compatible with a generalimage pattern. When a bit rate is low, the mode selection is moregreatly affected by an increment of the amount of codes of theprediction mode than by an incremental distortion. Therefore, thismethod is still advantageous in view of the overall encoding efficiency.However, when the bit rate is relatively high, the mode selection ismore greatly affected by the incremental distortion than by theincrement of the amount of codes of the prediction mode. Therefore, itdoes not necessarily mean that the smaller value of IntraPredModeA andIntraPredModeB is always optimal. Based on the observation as describedabove, in the fifth embodiment of the present invention, the setting ofthe prediction value is adapted according to the states ofIntraPredModeA and IntraPredModeB as described below to improve theaccuracy of the prediction value. In this procedure,predCurrIntraPredMode is determined based on the states ofIntraPredModeA and IntraPredModeB as a value providing the bestestimation of CurrIntraPredMode in terms of the image pattern (StepsS73, S74, and S75).

(1) When both IntraPredModeA and IntraPredModeB fall within the range of0 to 2, MIN(IntraPredModeA, IntraPredModeB) is determined aspredCurrIntraPredMode.

-   (2) When any one of IntraPredModeA and IntraPredModeB is 3 or larger    and the prediction directions of IntraPredModeA and IntraPredModeB    are completely different from each other (e.g., IntraPredModeA is 3    and IntraPredModeB is 4), the DC prediction (intra4×4_pred_mode=2)    is determined as predCurrIntraPredMode.-   (3) When any one of IntraPredModeA and IntraPredModeB is 3 or larger    and the prediction directions of IntraPredModeA and IntraPredModeB    are the same (e.g., IntraPredModeA is 3 and IntraPredModeB is 7 (any    one of the prediction directions is a prediction from the upper    right)), a pixel interpolating prediction mode (7 in the    above-mentioned example) is determined as predCurrIntraPredMode.

As in the third embodiment of the present invention, a preparatoryprocess for encoding IntraPredModeA and IntraPredModeB is performed inadvance (Steps S50, S53, and S59). As a result, predCurrIntraPredMode isuniquely derived from the values of IntraPredModeA and IntraPredModeB.FIG. 26 illustrate tables showing a prediction value setting rule. InFIG. 26, a hatched area corresponds to the case which does not followthe conventional rule of MIN(IntraPredModeA, IntraPredModeB). In thiscase, a more accurate prediction value is determined based on thecontinuity of the image patterns. The table for Class 0 is used in theprocedure (1) described above, whereas the table for Class 1 is used inthe procedures (2) and (3).

As the result of the above process, after the determination ofpredCurrIntraPredMode, the remaining encoding procedure for the C0 colorcomponent described in the third embodiment of the invention is executedto complete the encoding (Steps S52, S58, and S64).

Specifically, the encoding procedure is as follows:

if(CurrIntraPredMode == predCurrIntraPredMode) { prev_intra_pred_mode_flag = 1; } else {  prev_intra_pred_mode_flag = 0; if( CurrIntraPredMode < predCurrIntraPredMode)   rem_intra_pred_mode =CurrIntraPredMode;  else   rem_intra_pred_mode = CurrIntraPredMode − 1;} Encode prev_intra_pred_mode_flag; If(prev_intra_pred_mode_flag == 0) Encode rem_intra_pred_mode;

The above-mentioned encoding procedure can be similarly defined for theintra 8×8 prediction mode. By encoding the intra N×N prediction mode insuch a procedure, the correlation between the prediction modes in theneighboring pixel areas of the same color component can be moreefficiently used to reduce the amount of codes of the prediction modeitself, thereby improving the encoding efficiency.

2. Decoding Procedure of the Intra Prediction Mode Information in theDecoding Device

In the decoding device in the third embodiment of the present invention,one of the specific decoding procedures of the information of the intraN×N prediction mode in the variable length decoding unit 25 has beendescribed for the bit stream in the form illustrated in FIG. 16. In thefifth embodiment of the invention, another specific method of thedecoding procedure will be described. The fifth embodiment of theinvention is particularly characteristic in the following decodingprocedure. The decoding procedure focuses attention on the value of theintra N×N prediction mode, which reflects the structure of the textureas the image pattern, to decode the bit stream which is encoded by theadaptive prediction in the neighboring pixel areas of the same colorcomponent.

The following description is premised on the bit stream sequence in theform illustrated in FIG. 16. For the simplification of the description,the value of the intra encoding mode-sharing identification flag 33 inthe bit stream is set to “use a common intra encoding mode for C0, C1,and C2.” In addition, the intra N×N prediction mode is designated as theintra encoding mode, and the 4×4 block size is designated as thetransformation block size identification flags 0 to 2 (32 a to 32 c). Inthis case, all the intra-prediction modes 0 to 2 (35 a to 35 c) are theintra 4×4 prediction mode. As in the encoding device, in the decodingdevice, only the C0 component will be described based on the relationillustrated in FIG. 18 (the C1 and C2 components are decoded in the sameprocedure, independently of the C0 component). In the decoding device, acurrent macroblock to be decoded is denoted by X. A macroblock on theleft of the macroblock X is denoted by A, whereas a macroblock above themacroblock X is denoted by B.

In the third embodiment of the present invention, as described for theencoding device, the smaller value of IntraPredModeA and IntraPredModeBis uniquely allocated as the prediction value, predCurrIntraPredMode,for the intra 4×4 prediction mode, CurrIntraPredMode, which is allocatedto each 4×4 block X in FIG. 18. On the other hand, in the decodingdevice according to the fifth embodiment of the invention,predCurrIntraPredMode is determined by using the tables illustrated inFIG. 26 in exactly the same procedure as the encoding procedure. SinceIntraPredModeA and IntraPredModeB have already been decoded andtherefore are known, it is possible to perform exactly the same processas that of the encoding procedure.

The subsequent procedure is equivalent to the decoding procedure of theC0 component described in the third embodiment of the present invention.The procedure is summarized as follows.

Decode prev_intra_pred_mode_flag; if(prev_intra_pred_mode_flag == 1) { CurrIntraPredMode == predCurrIntraPredMode; } else {  Decoderem_intra_pred_mode;  if(rem_intra_pred_mode < predCurrIntraPredMode )  CurrIntraPredMode = rem_intra_pred_mode;  else   CurrIntraPredMode =rem_intra_pred_mode + 1; }

The above-mentioned decoding procedure can be similarly defined for theintra 8×8 prediction mode. By decoding the intra N×N prediction mode inthe procedure as described above, the correlation between the predictionmodes in the neighboring pixel areas of the same color component can bemore efficiently used to decode the encoded bit stream with the reducedamount of codes of the prediction mode itself.

The tables in FIG. 26 are used in a fixed manner to determinepredCurrIntraPredMode for performing the encoding and the decoding inthe above-mentioned example, whereas the encoding and the decoding maybe performed by using values of the tables in FIG. 26 as initial valuesto sequentially update the intra prediction mode, which is most likelyto occur for the states of IntraPredModeA and IntraPredModeB, aspredCurrIntraPredMode. For example, for the combination of “Class=0,IntraPredModeA=0, IntraPredModeB=0, and predCurrIntraPredMode=0” in FIG.26, predCurrIntraPredMode is always set to 0 when IntraPredModeA=0 andIntraPredModeB=0 in the above-mentioned embodiment. However, since thevideo signal itself is a non-stationary signal, there is no guaranteethat this combination is the best for all the contents of the videoimage. At worst, there is even a possibility that appropriatepredCurrIntraPredMode is not found as the prediction value in almost allthe cases throughout the entire video image. Therefore, for example, thefrequency of occurrences of CurrIntraPredMode in a case ofIntraPredModeA=0 and IntraPredModeB=0 is counted. Each time the encodingor the decoding of CurrIntraPredMode is terminated,predCurrIntraPredMode is updated with the prediction mode which the mostfrequently occurs for the states of IntraPredModeA and IntraPredModeB.With such a configuration, the prediction value used for encoding anddecoding CurrIntraPredMode can be set to the optimal value in view ofthe contents of a video image.

Sixth Embodiment

The sixth embodiment of the present invention describes another exampleof the configurations of the encoding device illustrated in FIG. 11 andthe decoding device illustrated in FIG. 12. As in the other embodimentsdescribed above, the encoding device and the decoding device in thesixth embodiment of the invention are provided with characteristicsspecific to the present invention based on the encoding method employedin Non-patent Document 1 cited above. The video encoding device in thesixth embodiment of the invention differs from the encoding deviceillustrated in FIG. 11 in the second, third, and fifth embodiments ofthe invention only in the operation of the variable length encoding unit11. The video decoding device in the sixth embodiment of the inventiondiffers from the decoding device illustrated in FIG. 12 in the second,third, and fifth embodiments of the invention only in the operation ofthe variable length decoding unit 25. The remaining operation is thesame as that in the second, third, and fifth embodiments of theinvention, and only differences with the above-mentioned embodimentswill be described below.

1. Encoding Procedure of the Intra Prediction Mode Information in theEncoding Device

In the encoding device in the third or fifth embodiment of the presentinvention, the specific encoding method of the intra N×N prediction modeinformation has been described for the bit stream in the formillustrated in FIG. 16. In the sixth embodiment, another specific methodof the encoding procedure will be described. This sixth embodiment isparticularly characteristic in that the following adaptive arithmeticcoding method is provided. This method focuses attention on the value ofthe intra N×N prediction mode which reflects the texture structure as animage pattern to perform adaptive arithmetic coding for the neighboringpixel areas of the same color component. The following description ispremised on the bit stream sequence in the form illustrated in FIG. 16.In the sixth embodiment, the intra N×N prediction mode information ofeach of the color components C0, C1, and C2 is independently encoded,and the encoding method for the C0 color component is applied similarlyto the C1 and C2 color components. Therefore, for the simplification ofthe description, only the encoding method for the C0 color componentwill be herein described. The value of the intra encoding mode-sharingidentification flag 33 is set to “use a common intra encoding mode forC0, C1, and C2,” and the intra encoding mode is set to the intra N×Nprediction mode, and the transformation block size identification flags0 to 2 (32 a to 32 c) indicate the 4×4 block. In this case, theintra-prediction modes 0 to 2 (35 a to 35 c) are all the intra 4×4prediction mode. As the drawings for illustrating the encoding procedureof the intra N×N prediction mode information of the C0 component, FIG.18 are used. In FIG. 18, a current macroblock to be encoded is denotedby X. A macroblock on the left of the macroblock X is denoted by A,whereas a macroblock above the macroblock X is denoted by B. FIG. 27 isa flowchart of the encoding procedure.

In the third and fifth embodiments of the present invention, the smallervalue of IntraPredModeA and IntraPredModeB is uniquely allocated as theprediction value, predCurrIntraPredMode, for the intra 4×4 predictionmode, CurrIntraPredMode, which is allocated to each 4×4 block X of FIG.18. According to this method, when the prediction value andCurrIntraPredMode are equal to each other, prev_intra_pred_mode_flag isset to 1 and the encoding of the intra 4×4 prediction mode for the blockX is terminated. On the other hand, when the prediction value andCurrIntraPredMode are different from each other, rem_intra_pred_mode isencoded to be transmitted. In the sixth embodiment, the states ofIntraPredModeA and IntraPredModeB are used to directly arithmeticallyencode CurrIntraPredMode. For the direct arithmetic coding, an encodingprocedure according to context-based adaptive binary arithmetic coding,which is employed in AVC/H.264 standard, is used.

First, CurrIntraPredMode to be encoded is binarized according to a formillustrated in FIG. 28 (Step S76). A first bin in a binary sequenceserves as a code for determining whether CurrIntraPredMode indicates avertical prediction or a horizontal prediction (see FIG. 3). The DCprediction (intra4×4_pred_mode=2) is classified as the horizontalprediction in this example, but the DC prediction may also be classifiedas the vertical prediction. A second bin provides a Terminate bit forthe prediction mode value which is considered to most frequently appearin each of the vertical prediction and the horizontal prediction. Thirdand subsequent bins are set to successively terminate the remainingprediction mode values in the order of higher appearance frequencies (itis desirable that the second and subsequent bins in the binary sequencein FIG. 28 be set according to a symbol occurrence probability in theactual image data encoding process).

The arithmetic coding is performed while a (0,1) occurrence probabilitytable to be used is sequentially selected for each of the bins in thebinary sequence. For encoding the first bin, a context used for thearithmetic coding is defined as follows (Step S78).

Context A(C_(A)): a flag, intra_pred_direction_flag, which is a binaryrepresentation indicating whether the intra prediction mode is thevertical prediction or the horizontal prediction, is defined forIntraPredModeA and IntraPredModeB, and the following four states areused as context values.

C_(A) (intra_pred_direction_flag forIntraPredModeA=1)+(intra_pred_direction_flag for IntraPredModeB=1)

where intra_pred_direction_flag is classified as the vertical prediction(=0) when, for example, intra4×4_pred_mode is 0, 3, 5, or 7 in FIG. 3,and is classified as the horizontal prediction (=1) whenintra4×4_pred_mode is 1, 2, 4, 6, or 8. For each of the four states ofC_(A), a conditional probability of CurrIntraPredMode on the premise ofthe states of IntraPredModeA and IntraPredModeB is obtained in advance.Then, a (0,1) initial occurrence probability table defined based on theobtained conditional probability is allocated to each of the fourstates. By configuring the context in this manner, a better estimationof the conditional occurrence probability of the first bin is obtainedto enhance the efficiency of arithmetic coding. The occurrenceprobability table for the first bin is selected based on the value ofC_(A) to execute the arithmetic coding. Then, the occurrence probabilitytable is updated with the encoded value (Step S79).

To the second and subsequent bins, the (0, 1) initial occurrenceprobability table determined based on the occurrence probability of eachprediction mode value is allocated in advance (Step S80). Subsequently,as for the first bin, the binary arithmetic coding and the occurrenceprobability table update are performed (Step S81).

The above-mentioned encoding procedure can be defined in the same mannerfor the intra 8×8 prediction mode. By encoding the intra N×N predictionmode in the procedure as described above, the adaptive arithmetic codingcan be used for encoding the prediction mode information by takingadvantage of the correlation between the prediction modes in theneighboring pixel areas of the same color component, thereby improvingthe encoding efficiency.

2. Decoding Procedure of the Intra Prediction Mode Information in theDecoding Device

In the decoding device in the third and fifth embodiments of the presentinvention, one of the specific decoding procedures of the information ofthe intra N×N prediction mode in the variable length decoding unit 25has been described for the bit stream in the form illustrated in FIG.16. In the sixth embodiment of the invention, another specific method ofthe decoding procedure will be described. The sixth embodiment of theinvention is particularly characteristic in the following decodingprocedure. The decoding procedure focuses attention on the value of theintra N×N prediction mode which reflects the structure of the texture asthe image pattern to decode the bit stream which is encoded by adaptivearithmetic coding in the neighboring pixel areas of the same colorcomponent.

The following description is premised on the bit stream sequence in theform illustrated in FIG. 16. For the simplification of the description,the value of the intra encoding mode-sharing identification flag 33 inthe bit stream is set to “use a common intra encoding mode for C0, C1,and C2.” In addition, the intra N×N prediction mode is designated as theintra encoding mode, and the 4×4 block size is indicated by thetransformation block size identification flags 0 to 2 (32 a to 32 c). Inthis case, the intra-prediction modes 0 to 2 (35 a to 35 c) are all theintra 4×4 prediction mode. As in the case of the encoding device, in thedecoding device, the decoding procedure will be described only for theC0 component based on the relation illustrated in FIG. 18 (the C1 and C2components are decoded in the same procedure, independently of the C0component). In the decoding device, a current macroblock to be decodedis denoted by X. A macroblock on the left of the macroblock X is denotedby A, whereas a macroblock above the macroblock X is denoted by B.

In the third and fifth embodiments of the present invention, asdescribed for the encoding device, the smaller value of IntraPredModeAand IntraPredModeB is uniquely allocated as the prediction value,predCurrIntraPredMode, for the intra 4×4 prediction mode,CurrIntraPredMode, which is allocated to each 4×4 block X in FIG. 18.Then, prev_intra_pred_mode_flag is decoded. When the value of thedecoded prev_intra_pred_mode_flag is 1, predCurrIntraPredMode is used asCurrIntraPredMode. On the other hand, when prev_intra_pred_mode_flag is0, rem_intra_pred_mode is decoded to restore the intra 4×4 predictionmode of the block X. On the other hand, in the sixth embodiment of thepresent invention, the states of IntraPredModeA and IntraPredModeB areused to directly arithmetically decode CurrIntraPredMode. For directarithmetic decoding, a decoding procedure according to context-basedadaptive binary arithmetic decoding, which is employed in the AVC/H.264standard, is used.

It is assumed that CurrIntraPredMode to be decoded is encoded as abinary sequence according to the form illustrated in FIG. 28. The binarysequence is successively subjected to binary arithmetic decoding fromits left end. As described in the encoding procedure in the sixthembodiment of the present invention, the first bin in the binarysequence is a code for classifying CurrIntraPredMode as the verticalprediction or the horizontal prediction (see FIG. 3). The second andsubsequent bins have code structures to successively terminate theprediction mode values in the order of a higher appearance frequency.The reason for such a code structure is as described in the encodingprocedure.

In the decoding process, for decoding the first bin, the same C_(A) asthat of the context used in the encoding procedure is determined. Theoccurrence probability table for the first bin is selected based on thevalue of C_(A) to execute the arithmetic decoding, thereby restoring thefirst bin. Moreover, the occurrence probability table is updated withthe decoded value.

To the second and subsequent bins, the (0, 1) initial occurrenceprobability table determined based on the occurrence probability of eachprediction mode value is allocated in advance. Subsequently, as for thefirst bin, the binary arithmetic decoding and the occurrence probabilitytable update are performed. Since the binary sequence in FIG. 28 isconfigured to enable each of the prediction mode values to be uniquelyspecified, CurrIntraPredMode is sequentially decoded after apredetermined number of bins are restored.

The above-mentioned decoding procedure can be similarly defined for theintra 8×8 prediction mode. By decoding the intra N×N prediction mode inthe procedure as described above, the encoded bit stream can be decodedwith the amount of codes of the prediction mode itself being reduced bythe arithmetic coding, taking advantage of the correlation between theprediction modes in the neighboring pixel areas of the same colorcomponent.

In the above-mentioned example, other variations of the tableillustrated in FIG. 28 are conceivable. For example, a method ofconfiguring a binary sequence as illustrated in FIG. 29 is possible.According to this method, the following context B is used for the firstbin.

Context B(CB): a flag, intra_dc_pred_flag, which is a binaryrepresentation indicating whether the intra prediction mode is the DCprediction or not, is defined for IntraPredModeA and IntraPredModeB, andthe following four states are used as context values.

C _(B)=(intra_dc_pred_flag for IntraPredModeA=1)+(intra_dc_pred_flag forIntraPredModeB=1)

where intra_dc_pred_flag is set to 1 when intra4×4_pred_mode is 2 inFIG. 3, and is set to 0 when intra4×4_pred_mode is any other value. Foreach of the four states of C_(B), a conditional probability ofCurrIntraPredMode on the premise of the states of IntraPredModeA andIntraPredModeB is obtained in advance. Then, the (0,1) initialoccurrence probability table for the first bin defined based on theobtained conditional probability is allocated to each of the fourstates. In FIG. 29, when CurrIntraPredMode is the DC prediction, thefirst bin is designed to have a value 0. When CurrIntraPredMode is notthe DC prediction, the first bin is designed to have a value 1. For thesecond bin, the above-mentioned context A(C_(A)) is used. By configuringthe context in this manner, a better estimation of the conditionaloccurrence probability for any one of the first bin and the second bincan be obtained to enhance the efficiency of arithmetic coding.

Seventh Embodiment

In the seventh embodiment of the present invention, an encoding devicewhich performs encoding using inter-frame prediction in units ofrectangular areas (macroblocks), each being composed of 16×16 pixels,obtained by equally dividing a video frame input in the 4:4:4 format,and a decoding device corresponding to the encoding device will bedescribed. The encoding device and the decoding device in the seventhembodiment of the invention are provided with characteristics specificto the present invention based on the encoding method employed in theMPEG-4 AVC (ISO/IEC 14496-10)/ITU-T H.264 standard (hereinafter,referred to simply as AVC).

FIG. 30 illustrates a configuration of a video encoding device in theseventh embodiment of the invention, and FIG. 31 illustrates a videodecoding device in the seventh embodiment of the invention. In FIG. 31,the components denoted by the same reference numerals as those of theencoding device illustrated in FIG. 30 are the same components.

Hereinafter, the operations of the entire encoding device and decodingdevice in the seventh embodiment, and an inter prediction modedetermining process and a motion compensation prediction decodingprocess, which are specific operations according to the seventhembodiment, will be described based on FIGS. 30 and 31.

1. Outline of Operation of the Encoding Device

In the encoding device illustrated in FIG. 30, each video frame is inputin the 4:4:4 format. Moreover, each of three color components is dividedand gathered into the macroblock having the same size to be input to theencoding device as the input video signal 1.

First, in a motion compensation prediction unit 102, a one-framereference image is selected from motion compensation predictionreference image data for one frame or more, which is stored in thememories 16, to perform a motion-compensation predicting process inunits of the macroblocks for each of the color components. Threememories are prepared for the respective color components (the number ofmemories is described as three in this embodiment, but the number ofmemories may be appropriately changed according to the design). Sevenblock sizes are prepared for a motion compensation prediction. First,for each macroblock, any one of 16×16, 16×8, 8×16, and 8×8 sizes can beselected as illustrated in FIGS. 32A to 32D. Further, in the case ofselection of the 8×8 size, any one of 8×8, 8×4, 4×8, and 4×4 sizes canbe selected for each of the 8×8 blocks as illustrated in FIGS. 32E to32H. As the information of the selected size, size information for eachmacroblock is output as a macroblock type, whereas size information foreach 8×8 block is output as a sub-macroblock type. An identificationnumber and motion vector information of the selected reference image areoutput for each block.

The video encoding device in the seventh embodiment of the presentinvention is characterized in that the motion compensation predictionmethod is switched for each of the three color components based on aninter prediction mode-sharing identification flag 123. This regard willbe described in detail in the section 2 below.

The motion compensation prediction unit 102 executes the motioncompensation predicting process for all the block sizes or sub-blocksizes illustrated in FIGS. 32A to 32H, all motion vectors 137 within apredetermined search range, and one or more selectable referenceimage(s) to obtain a prediction difference signal 4 from the motionvectors 137 and the single reference image in the subtracter 3. Theprediction efficiency of the prediction difference signal 4 is evaluatedin the encoding mode determining unit 5. Then, through the predictionprocess executed in the motion compensation prediction unit 102, themacroblock type/sub-macroblock type 106, the motion vector 137, and theidentification number of the reference image, which can provide theoptimal prediction efficiency for the macroblock to be predicted, areoutput. For the selection of the macroblock type/sub-macroblock type106, the weighting coefficient 20 for each type determined by thedetermination of the encoding control unit 19 is taken intoconsideration in some cases. The prediction difference signal 4, whichis obtained by the motion compensation prediction based on the selectedmacroblock/sub-macroblock type, motion vector 137, and reference image,is output to the orthogonal transform unit 8. The orthogonal transformunit 8 transforms the input prediction difference signal 4 into anorthogonal transform coefficient to output the obtained orthogonaltransform coefficient to the quantization unit 9. The quantization unit9 quantizes the input orthogonal transform coefficient based on thequantization parameter 21 determined by the encoding control unit 19 tooutput the result of quantization as the quantized transform coefficient10 to the variable length encoding unit 11. The quantized transformcoefficient 10 is entropy-coded by means such as Huffman-encoding orarithmetic coding in the variable length encoding unit 11. The quantizedtransform coefficient 10 passes through the inverse quantization unit 12and the inverse orthogonal transform unit 13 to be restored to the localdecoded prediction difference signal 14. Then, the local decodedprediction difference signal 14 is added to the predicted image 7generated based on the selected macroblock type/sub-macroblock type 106,motion vector 137, and reference image, in the adder 18 to generate thelocal decoded image 15. The local decoded image 15 is stored in thememories 16 to be used for a subsequent motion compensation predictionprocess. Moreover, the deblocking filter control flag 24 indicatingwhether or not a deblocking filter is to be applied to the macroblock isalso input to the variable length encoding unit 11 (the deblockingfilter process itself is not required for the encoding process becausethe pixel data prior to the application of the deblocking filter isstored in the memories 16 in the prediction process executed in themotion compensation prediction unit 102, however, in the decoding devicethe deblocking filter is applied upon instruction of the deblockingfilter control flag 24 to obtain the final decoded image).

The inter prediction mode-sharing identification flag 123, the quantizedtransform coefficient 10, the macroblock type/sub-macroblock type 106,the motion vector 137, the reference image identification number, andthe quantization parameter 21, which are input to the variable lengthencoding unit 11, are arranged and shaped as a bit stream according to apredetermined rule (syntax) to be output to the transmission buffer 17.The transmission buffer 17 smoothes the bit stream according to the bandof a transmission path to which the encoding device is connected or thereading velocity of a recording medium to output the bit stream as thevideo stream 22. The transmission buffer 17 outputs feedback informationto the encoding control unit 19 according to the state of accumulationof the bit streams in the transmission buffer 17 to control the amountof codes generated in the encoding of subsequent video frames.

2. Inter Prediction Mode Determining Process in the Encoding Device

The inter prediction mode determining process, which is a feature of theencoding device in the seventh embodiment of the present invention, willbe described in detail. Note that the inter prediction mode in thefollowing description denotes the block size serving as the unit of themotion compensation prediction described above, that is, the macroblocktype/sub-macroblock type, and the inter prediction mode determiningprocess is for selecting the macroblock type/sub-macroblock type, themotion vector, and the reference image. This process is executed on themacroblock basis, each macroblock being obtained by gathering theabove-mentioned three color components, mainly by the motioncompensation prediction unit 102 and the encoding mode determining unit5 in the encoding device illustrated in FIG. 30. FIG. 33 is a flowchartillustrating a flow of this process. Hereinafter, image data of thethree color components constituting the blocks are referred to as C0,C1, and C2, respectively.

First, the encoding mode determining unit 5 receives the interprediction mode-sharing identification flag 123 to determine, based on avalue of the inter prediction mode-sharing identification flag 123,whether or not the common inter prediction mode, the common motionvector 137, and the common reference image are used for C0, C1, and C2(Step S100 of FIG. 33). If the common inter prediction mode, the commonmotion vector 137, and the common reference image are used, the processproceeds to Step S101 and the following steps. Otherwise, the processproceeds to Step S102 and the following steps.

When the inter prediction mode, the motion vector 137, and the referenceimage are common to C0, C1, and C2, the encoding mode determining unit 5notifies the motion compensation prediction unit 102 of all theselectable inter prediction modes, motion vectors in the search range,and reference images. The motion compensation prediction unit 102evaluates all the prediction efficiencies thereof to select the interprediction mode, the motion vector 137, and the reference image commonto and optimal for all the C0, C1, and C2 components (Step S101).

On the other hand, when the optimal mode is individually selected foreach of C0, C1, and C2 without sharing the inter prediction mode, themotion vector 137, and the reference image between C0, C1, and C2, theencoding mode determining unit 5 notifies the motion compensationprediction unit 102 of all the inter prediction modes, the motionvectors in the search range, and the reference images selectable for thecomponent Ci (i<=0<3). The motion compensation prediction unit 102evaluates all the prediction efficiencies thereof to select the optimalinter prediction mode, the motion vector 137, and the reference imageoptimal for the component Ci (i<=0<3) (Steps S102, S103, and S104).

As a prediction efficiency evaluation norm of the prediction modeexecuted in the motion compensation prediction unit 102, for example, arate-distortion cost given by:

Jm,v,r=Dm,v,r+λRm,v,r (λ: a positive number)

can be used. In this expression, Dm,v,r is an encoding distortion or aprediction error amount when an inter prediction mode m, a motion vectorv within a predetermined range, and a reference image r are used. Theencoding distortion is obtained by obtaining a prediction error usingthe inter prediction mode m, the motion vector v, and the referenceimage r, decoding a video image from the result of transform andquantization of the prediction error, and then measuring an error withrespect to a signal prior to the encoding. The prediction error amountis obtained by obtaining a difference between a predicted image and thesignal prior to the encoding generated when the inter prediction mode m,the motion vector v, and the reference image r are used, and thenquantifying the difference. For example, a sum of absolute distance(SAD) is used as the prediction error amount. Then, Rm,v,r is the amountof generated codes when the inter prediction mode m, the motion vectorv, and the reference image r are used. Specifically, Jm,v,r is a valuedefining a tradeoff between the amount of codes and the degree ofdeterioration when the inter prediction mode m, the motion vector v, andthe reference image r are used. The inter prediction mode m, the motionvector v, and the reference image r, which give the smallest Jm,v,r,provide the optimal solution.

When the encoding device executes the process after Step S101 and thefollowing steps, one combination of information of the inter predictionmode, the motion vector 137, and the reference image is allocated to themacroblock containing three color components. On the other hand, whenthe encoding device executes the process after Step S102 and thefollowing steps, the inter prediction mode information, the motionvector 137, and the reference image are allocated to each of the colorcomponents. Accordingly, since the information of the inter predictionmode, the motion vector 137, and the reference image, which is allocatedto the macroblock, differs for each case, the inter predictionmode-sharing identification flag 123 is required to be multiplexed inthe bit stream to enable the decoding device to recognize whether theencoding device has executed the process after S101 or the process afterS102. A data sequence of such a bit stream is illustrated in FIG. 34.

FIG. 34 shows the data sequence of the bit stream at the macroblocklevel. The macroblock type contains information which indicates intra orinter prediction mode. When the macroblock type indicates the interprediction mode, the information indicates the block size serving as theunit of motion compensation. The sub-macroblock type is multiplexed onlywhen the 8×8 block size is selected as the macroblock type and containsblock size information for each 8×8 block. A basic macroblock type 128and a basic sub-macroblock type 129 each indicate a common macroblocktype and a common sub-macroblock type when the inter predictionmode-sharing identification flag 123 indicates that the inter predictionmode is “common to C0, C1, and C2.” Otherwise, the basic macroblock type128 and the basic sub-macroblock type 129 indicate the macroblock typeand the sub-macroblock type for C0. An extended macroblock type 130 andan extended sub-macroblock type 131 are multiplexed for each of C1 andC2 only when the inter prediction mode-sharing identification flag 123indicates that the inter prediction mode is not “common to C0, C1, andC2,” and indicate the macroblock type and the sub-macroblock type for C1and C2.

The reference image identification number is information for specifyingthe reference image to be selected for each block of the 8×8 block sizeor larger serving as the unit of motion compensation. In the case ofinter-frame mode, a selectable reference image is one-frame image.Therefore, one reference image identification number is multiplied foreach block. One set of the motion vector information is multiplexed foreach block serving as the unit of motion compensation. The number of thereference image identification numbers and the motion vector informationwhich are multiplexed is required to correspond to that of the blockscontained in the macroblock, each block serving as the unit of themotion compensation. When the inter prediction mode-sharingidentification flag 123 indicates that the mode is “common to C0, C1,and C2,” the basic reference image identification number 132 and thebasic motion vector information 133 are a common reference imageidentification number and common motion vector information. Otherwise,the basic reference image identification number 132 and the basic motionvector information 133 are the reference image identification number andthe motion vector information for C0. The extended reference imageidentification number 134 and the extended motion vector information 135are multiplexed for each of C1 and C2 only when the inter predictionmode-sharing identification flag 123 indicates that the mode is not“common to C0, C1, and C2,” and are the reference image identificationnumber and the motion vector information for C1 and C2.

Subsequently, the quantization parameter 21 and the quantized transformcoefficient 10 are multiplexed (FIG. 34 does not illustrate thedeblocking filter control flag 24 which is input to the variable lengthencoding unit 11 of FIG. 30, but the illustration thereof is hereinomitted because the deblocking filter control flag 24 is not anessential component for the description of the characteristic of theseventh embodiment of the present invention).

In the 4:2:0 format which has been used in the conventional videoencoding standard, the color space definition is fixed to Y, Cb, and Cr.In the 4:4:4: format, however, a color space is not limited to that ofY, Cb, and Cr, and various color spaces can be used. By configuring theinter prediction mode information as illustrated in FIG. 34, the optimalencoding process can be performed even when the definition of the colorspace of the input video signal 1 is varied. For example, when the colorspace is defined by R, G, and B, the structure of a video textureremains equally in the components R, G, and B. In such an area, the useof the common inter prediction mode information and the common motionvector information can reduce the redundancy of the inter predictionmode information and the motion vector information themselves to enhancethe encoding efficiency. On the other hand, for example, in an areawhich does not contain red at all (the R component is 0), the interprediction mode and the motion vector information optimal for the Rcomponent must differ from those optimal for the components G and B.Therefore, by adaptively using the extended inter prediction mode, theextended reference image identification information, and the extendedmotion vector information, the optimal encoding efficiency can beobtained.

3. Outline of Operation of the Decoding Device

The decoding device illustrated in FIG. 31 receives the video stream 22according to the data sequence illustrated in FIG. 34, which is outputfrom the encoding device illustrated in FIG. 30, and performs a decodingprocess on the macroblock basis, each macroblock containing three colorcomponents of the same size (in the 4:4:4 format), to restore each videoframe.

First, the variable length decoding unit 25 receives the video stream 22as an input to decipher the video stream 22 according to a predeterminedrule (syntax), thereby extracting information such as the interprediction mode-sharing identification flag 123, the quantized transformcoefficient 10, the macroblock type/sub-macroblock type 106, thereference image identification number, the motion vector information,and the quantization parameter 21. The quantized transform coefficient10 is input together with the quantization parameter 21 to the inversequantization unit 12, in which the inverse quantization process isperformed. Subsequently, the output from the inverse quantization unit12 is input to the inverse orthogonal transform unit 13 to be restoredto the local decoded prediction difference signal 14. On the other hand,the macroblock type/sub-macroblock type 106, the inter predictionmode-sharing identification flag 123, the motion vector 137, and thereference image identification number are input to the motioncompensation prediction unit 102 to obtain the predicted image 7according to the input information. A specific procedure for obtainingthe predicted image 7 will be described below. The local decodedprediction difference signal 14 and the predicted image 7 are added bythe adder 18 to obtain the temporary decoded image 15 (which is exactlythe same signal as the local decoded image 15 in the encoding device).The temporary decoded image 15 is written back to the memories 16 to beused for the motion compensation prediction of the subsequentmacroblocks. Three memories 16 are prepared for the respective colorcomponents (the number of memories is described as three in thisembodiment, but the number of memories can be appropriately changedaccording to the design). Moreover, based on the indication of thedeblocking filter control flag 24 deciphered by the variable lengthdecoding unit 25, the deblocking filter 26 is caused to act on thetemporary decoded image 15 to obtain the final decoded image 27.

4. Inter Prediction Decoding Process in the Decoding Device

The decoding device illustrated in FIG. 31 receives the video stream 22according to the sequence illustrated in FIG. 34, which is output fromthe encoding device illustrated in FIG. 30, and performs a decodingprocess on the macroblock basis, each macroblock being composed of threecolor components of the same size (in the 4:4:4 format), to restore eachvideo frame.

An inter prediction image generating process which is a feature of thedecoding device according to the seventh embodiment will be described indetail. This process is implemented on the macroblock basis, eachmacroblock being obtained by gathering the three color componentsdescribed above, and is mainly performed by the variable length decodingunit 25 and the motion compensation prediction unit 102 in the decodingdevice illustrated in FIG. 31. FIG. 35 is a flowchart illustrating aflow of a part of the inter prediction image generating process, whichis implemented in the variable length decoding unit 25.

It is assumed that the video stream 22 which is an input to the variablelength decoding unit 25 follows the data sequence illustrated in FIG.34. In Step S110, the inter prediction mode-sharing identification flag123 in the data illustrated in FIG. 34 is decoded (Step S110). Further,the basic macroblock type 128 and the basic sub-macroblock type 129 aredecoded (Step S111). In Step S112, it is determined by using the resultof the inter prediction mode-sharing identification flag 123 whether ornot to use the inter prediction mode common to C0, C1, and C2. When thecommon inter prediction mode is used (Yes in Step S112), the basicmacroblock type 128 and the basic sub-macroblock type 129 are used forall of C0, C1, and C2. Otherwise (No in Step S112), the basic macroblocktype 128 and the basic sub-macroblock type 129 are used as the mode forC0. Then, the extended macroblock type 130 and the extendedsub-macroblock type 131 are decoded for each of C1 and C2 (Step S113) toobtain the inter prediction mode information of C1 and C2. Next, thebasic reference image identification number 132 and the basic motionvector information 133 are decoded (Step S114). When the interprediction mode-sharing identification flag 123 indicates that the basicreference image identification number 132 and the basic motion vectorinformation 133 “common to C0, C1, and C2” are used (Yes in Step S115),the basic reference image identification number 132 and the basic motionvector information 133 are used for all of C0, C1, and C2. Otherwise (Noin Step S115), the basic reference image identification number 132 andthe basic motion vector information 133 are used as information for C0.Then, for each of C1 and C2, the extended reference image identificationnumber 134 and the extended motion vector information 135 are decoded(Step S116). Since the macroblock type/sub-macroblock type 106, thereference image identification number, and the motion vector informationof each of the color components is determined through theabove-mentioned process, the determined macroblock type/sub-macroblocktype 106, reference image identification number, and motion vectorinformation are output to the motion compensation prediction unit 102 toobtain a motion compensation prediction image of each of the colorcomponents.

FIG. 36 illustrates a variation of the bit stream data sequenceillustrated in FIG. 34. In FIG. 36, the inter prediction mode-sharingidentification flag 123 is multiplexed not as a flag at the macroblocklevel but as a flag positioned in the higher-order data layer such asthe slice, the picture, or the sequence. As a result, when asufficiently high prediction efficiency is ensured by the switching inthe higher-order layer equal to or higher than the slice, overhead bitscan be reduced without multiplexing the inter prediction mode-sharingidentification flag 123 at the macroblock level for each time.

In FIGS. 34 and 36, the inter prediction mode-sharing identificationflag 123 is multiplexed for each macroblock or in the higher-order datalayer such as the slice, the picture or the sequence. When the videoimage in the 4:4:4 format is encoded without multiplexing the interprediction mode-sharing identification flag 123, the inter predictionmode and the motion vector information different for each component mayalways be used. A sequence of the bit stream data in this case isillustrated in FIG. 37. In FIG. 37, the inter prediction mode-sharingidentification flag 123 is not present. Instead, profile information 136which instructs the handling of an input image in the 4:4:4 format ismultiplexed in the higher-order layer such as the sequence. Based on theresult of decoding of the profile information, the extended macroblocktype 130, the extended sub-macroblock type 131, the extended referenceimage identification number 134, and the extended motion vectorinformation 135 are multiplexed.

Eighth Embodiment

In the seventh embodiment of the present invention, each of themacroblock type/sub-macroblock type, the motion vector, and thereference image can be set different for each of the color components.The eighth embodiment of the present invention describes a videoencoding device and a video decoding device, which are characterized inthat the macroblock type/sub-macroblock type and the motion vectorcommon to the color components are used while only a motion vector to beused can be different for each of the color components. Theconfigurations of the video encoding device and the video decodingdevice in the eighth embodiment are the same as those illustrated inFIGS. 30 and 31 in the seventh embodiment of the invention, but adifference lies in that a motion vector-sharing identification flag 123b is provided in place of the inter prediction mode-sharingidentification flag 123.

1. Inter Prediction Mode Determining Process in the Encoding Device

An inter prediction mode determining process which is a feature of theencoding device in the eighth embodiment of the present invention willbe described in detail mainly for a part different from the interprediction mode determining process in the seventh embodiment of theinvention.

This process is implemented on the macroblock basis, each macroblockbeing obtained by gathering the above-mentioned three color components,mainly by the motion compensation prediction unit 102 and the encodingmode determining unit 5 in the encoding device of FIG. 30. FIG. 38 is aflowchart illustrating a flow of this process. Hereinafter, image dataof the three color components constituting the blocks are referred to asC0, C1, and C2, respectively.

First, the encoding mode determining unit 5 receives the motionvector-sharing identification flag 123 b to determine, based on a valueof the flag 123 b, whether or not to use the motion vector 137 common toC0, C1, and C2 (Step S120 in FIG. 38). If the motion vector 137 commonto C0, C1, and C2 is used, the process proceeds to Step S121 and thefollowing steps. Otherwise, the process proceeds to Step S122 and thefollowing steps.

When the motion vector 137 common to C0, C1, and C2 is used, theencoding mode determining unit 5 notifies the motion compensationprediction unit 102 of all the selectable inter prediction modes, motionvectors in the search range, and reference images. The motioncompensation prediction unit 102 evaluates all the predictionefficiencies thereof to select the inter prediction mode, the motionvector 137, and the reference image, which are common to and optimal forC0, C1, and C2 (Step S121).

When the best motion vector is selected for each of C0, C1, and C2without using the motion vector 137 common to C0, C1, and C2, theencoding mode determining unit 5 notifies the motion compensationprediction unit 102 of all the selectable inter prediction modes, motionvectors in the search range, and reference images. The motioncompensation prediction unit 102 evaluates all the predictionefficiencies thereof to select the inter prediction mode and thereference image common to and optimal for C0, C1, and C2 (Step S122).Further, the optimal motion vector for the component Ci (i<=0<3) isselected (Steps S123, S124, and S125).

The motion vector-sharing identification flag 123 b is required to bemultiplexed in the bit stream to be recognized by the decoding device. Adata sequence of such a bit stream is illustrated in FIG. 39.

FIG. 39 illustrates a data sequence of the bit stream at the macroblocklevel. A macroblock type 128 b, a sub-macroblock type 129 b, and areference image identification number 132 b are “common to C0, C1, andC2.” The basic motion vector information 133 indicates common motionvector information when the motion vector-sharing identification flag123 b indicates “common to C0, C1, and C2.” Otherwise, the basic motionvector information 133 indicates the motion vector information for C0.The extended motion vector information 135 is multiplexed for each of C1and C2 to indicate the motion vector information for each of C1 and C2only when the motion vector-sharing identification flag 123 b is not“common to C0, C1, and C2.” The macroblock type/sub-macroblock type 106in FIGS. 30 and 31 is a collective designation of the macroblock type128 b and the sub-macroblock type 129 b in FIG. 39.

2. Inter Prediction Decoding Process in the Decoding Device

The decoding device in the eighth embodiment of the present inventionreceives the video stream 22 according to the sequence illustrated inFIG. 39, which is output from the encoding device of the eighthembodiment of the invention, and performs a decoding process on themacroblock basis, each macroblock being composed of three colorcomponents of the same size (in the 4:4:4 format), to restore each videoframe.

An inter prediction image generating process which is a feature of thedecoding device in the eighth embodiment of the present invention willbe described in detail mainly for a part of the process different fromthat in the seventh embodiment of the present invention. This process isimplemented on the macroblock basis, each macroblock being obtained bygathering the three color components described above, and is mainlyperformed by the variable length decoding unit 25 and the motioncompensation prediction unit 102 in the decoding device illustrated inFIG. 31. FIG. 40 is a flowchart illustrating a flow of a part of theinter prediction image generating process, which is implemented in thevariable length decoding unit 25.

It is assumed that the data sequence of the video stream 22 which isinput to the variable length decoding unit 25 is as that illustrated inFIG. 39. In Step S126, the macroblock type 128 b or the sub-macroblocktype 129 b common to C0, C1, and C2 is decoded. Since the decodedmacroblock type 128 b or sub-macroblock type 129 b determines the blocksize serving as the unit of motion compensation, the reference imageidentification number 132 b common to C0, C1, and C2 is decoded for eachblock serving as the unit of motion compensation (Step S127). In StepS128, the motion vector-sharing identification flag 123 b is decoded.Next, the basic motion vector information 133 is decoded for each blockserving as the unit of motion compensation (Step S129). In Step S130,the result of the motion vector-sharing identification flag 123 b isused to determine whether or not to use the motion vector 137 common toC0, C1, and C2. When the common motion vector 137 is used (Yes in StepS130), the basic motion vector information is used for all of C0, C1,and C2. Otherwise (No in Step S130), the basic motion vector 133 is usedas the mode for C0. Further, the extended motion vector information 135is decoded for each of C1 and C2 (Step S131). Through theabove-mentioned process, the macroblock type/sub-macroblock type 106,the reference image identification number, and the motion vectorinformation are determined for each of the color components. Therefore,the determined macroblock type/sub-macroblock type 106, reference imageidentification number, and motion vector information are output to themotion compensation prediction unit 102 to obtain the motioncompensation prediction image of each of the color components.

FIG. 41 illustrates a variation of the bit stream data sequenceillustrated in FIG. 39. In FIG. 39, the motion vector-sharingidentification flag 123 b is multiplexed not as a flag at the macroblocklevel but as a flag positioned in the higher-order data layer such asthe slice, the picture or the sequence. As a result, when a sufficientlyhigh prediction efficiency can be ensured by switching in thehigher-order layer equal to or higher than the slice layer, overheadbits can be reduced without multiplexing the motion vector-sharingidentification flag 123 b at the macroblock level for each macroblock.

In FIGS. 39 and 41, the motion vector-sharing identification flag 123 bis multiplexed for each macroblock or in the higher-order data layersuch as the slice, the picture or the sequence. Alternatively, inencoding the video image in the 4:4:4 format without multiplexing themotion vector-sharing identification flag 123 b, different motion vectorinformation may always be used for each component. A sequence of the bitstream data in such a case is illustrated in FIG. 42. In FIG. 42, themotion vector-sharing identification flag 123 b is not present. Theprofile information 136 instructing the handling of an input image inthe 4:4:4: format is multiplexed in the higher-order layer such as thesequence layer. Based on the result of decoding of the profileinformation 136, the extended motion vector information 135 ismultiplexed.

In the eighth embodiment of the present invention, the macroblocktype/sub-macroblock type 106 and the reference image common to the colorcomponents are used, whereas only the different motion vectors 137 canbe used for each of the color components. As a result, when asufficiently high prediction efficiency is obtained by adapting only themotion vector 137 to each of the color components, overhead bits can bereduced without multiplexing the macroblock type/sub-macroblock type 106or the reference image identification number for each of the colorcomponents.

Ninth Embodiment

In the seventh embodiment of the present invention, the inter predictionmode-sharing identification flag 123 or the profile information 136allows the switching between the common use of each of the macroblocktype/sub-macroblock type 106, the motion vector 137, and the referenceimage for the three color components or the use of each of themacroblock type/sub-macroblock type 106, the motion vector 137, and thereference image different for each of the color components. In the ninthembodiment of the present invention, assuming the image in the 4:4:4format such as in the Y, Cb, and Cr format, switching is enabled betweenthe use of a mode common to the luminance component (Y) and thechrominance components (Cb and Cr) and the use of different modes forthe luminance component and the chrominance components (in this case,the common mode is used for the two chrominance components).Specifically, a video encoding device and a video decoding device whichare characterized in that switching is enabled between the use of acommon mode to the three components, the use of a different mode foreach of the components, and the use of different modes for the luminancecomponent and the chrominance components will be described. Theconfigurations of the video encoding device and the video decodingdevice in the ninth embodiment of the invention are the same as thoseillustrated in FIGS. 30 and 31 in the seventh embodiment of theinvention.

1. Inter Prediction Mode Determining Process in the Encoding Device

An inter prediction mode determining process which is a feature of theencoding device in the ninth embodiment of the present invention will bedescribed in detail, mainly for a part different from the interprediction mode determining process in the seventh embodiment of thepresent invention.

This process is implemented on the macroblock basis, each macroblockbeing obtained by gathering the above-mentioned three color components,and is performed mainly by the motion compensation prediction unit 102and the encoding mode determining unit 5 in the encoding device in FIG.30. FIG. 43 is a flowchart illustrating a flow of this process.Hereinafter, image data of the three color components constituting theblocks are referred to as C0, C1, and C2, respectively.

First, the encoding mode determining unit 5 receives the interprediction mode-sharing identification flag 123 to determine, based on avalue of the flag 123, whether or not to use the inter prediction mode,the motion vector 137, and the reference image which are common to C0,C1, and C2 (Step S132 in FIG. 43). If the inter prediction mode, themotion vector 137, and the reference image which are common to C0, C1,and C2 are used, the process proceeds to Step S133 and the followingsteps. Otherwise, the process proceeds to Step S 134 and the followingsteps or Step S 137 and the following steps.

When the inter prediction mode, the motion vector 137, and the referenceimage which are common to C0, C1, and C2 are used, the encoding modedetermining unit 5 notifies the motion compensation prediction unit 102of all the selectable inter prediction modes, motion vectors in thesearch range, and reference images. The motion compensation predictionunit 102 evaluates all the prediction efficiencies thereof to select theoptimal inter prediction mode, motion vector 137 and reference imagecommon to C0, C1, and C2(Step S133).

When the best mode is selected for each of the color components C0, C1,and C2 without using the inter prediction mode, the motion vector 137,and the reference image common to C0, C1, and C2, the encoding modedetermining unit 5 notifies the motion compensation prediction unit 102of all the inter prediction modes, the motion vectors in the searchrange, and the reference images selectable for the component Ci(i<=0<3). The motion compensation prediction unit 102 evaluates all theprediction efficiencies thereof to select the optimal inter predictionmode, motion vector 137, and reference image for the component Ci(i<=0<3) (Steps S134, S135, and S136).

When the inter prediction mode, the motion vector 137, and the referenceimage common to C1 and C2 are used to select the best mode for C0(corresponding to the luminance component) and that for C1 and C2(corresponding to the chrominance components), the encoding modedetermining unit 5 notifies the motion compensation prediction unit 102of all the inter prediction modes, the motion vectors in the searchrange, and the reference images selectable for the C0 component. Themotion compensation prediction unit 102 evaluates all the predictionefficiencies thereof to select the inter prediction mode, the motionvector 137, and the reference image optimal for the C0 component (StepS137). Further, the encoding mode determining unit 5 notifies the motioncompensation prediction unit 102 of all the inter prediction modes, themotion vectors in the search range, and the reference images selectablefor the C1 and C2 components. The motion compensation prediction unit102 evaluates all the prediction efficiencies thereof to select theinter prediction mode, the motion vector 137, and the reference image,which are common to and optimal for the C1 and C2 components (StepS138).

A data sequence of the bit stream output from the encoding device in theninth embodiment of the present invention is the same as thatillustrated in FIG. 34. When the inter prediction mode-sharingidentification flag 123 indicates that the mode is “common to C1 andC2,” the extended macroblock type 130, the extended sub-macroblock type131, the extended reference identification number 134, and the extendedmotion vector information 135 are information common to C1 and C2.

2. Inter Prediction Decoding Process in the Decoding Device

The decoding device in the ninth embodiment of the present inventionreceives the video stream 22 according to the sequence illustrated inFIG. 34, which is output from the encoding device in the ninthembodiment of the present invention, and performs a decoding process onthe macroblock basis, each macroblock being composed of three colorcomponents of the same size (in the 4:4:4 format), to restore each videoframe.

An inter prediction image generating process which is a feature of thedecoding device in the ninth embodiment of the present invention will bedescribed in detail mainly for a part of the process different from thatin the seventh embodiment of the present invention. This process isimplemented on the macroblock basis, each macroblock being obtained bygathering the three color components described above, and is mainlyperformed by the variable length decoding unit 25 and the motioncompensation prediction unit 102 in the decoding device illustrated inFIG. 31. FIG. 44 is a flowchart illustrating a flow of a part of theinter prediction image generating process, which is implemented in thevariable length decoding unit 25.

It is assumed that the video stream 22 which is input to the variablelength decoding unit 25 follows the data sequence illustrated in FIG.34. In Step S140, the inter prediction mode-sharing identification flag123 in the data illustrated in FIG. 34 is decoded (Step S140). Further,the basic macroblock type 128 and the basic sub-macroblock type 129 aredecoded (Step S141). In Step S 142, the result of the inter predictionmode-sharing identification flag 123 is used to determine whether or notto use the inter prediction mode common to C0, C1, and C2. When theinter prediction mode common to C0, C1, and C2 is used, the basicmacroblock type 128 and the basic sub-macroblock type 129 are used forall the color components C0, C1, and C2. Otherwise, the basic macroblocktype 128 and the basic sub-macroblock type 129 are used as the mode forC0. Further, when the inter prediction mode is common to C1 and C2, theextended macroblock type 130 and the extended sub-macroblock type 131common to the C1 and C2 components are decoded (Step S143). Whendifferent modes are used for the color components C0, C1, and C2, theextended macroblock type 130 and the extended sub-macroblock type 131are decoded for each of C1 and C2 (Steps S144, S145, and S 146) toobtain mode information of each of C1 and C2. Next, the basic referenceimage identification number 132 and the basic motion vector information133 are decoded (Step S147). When the inter prediction mode-sharingidentification 123 indicates that the inter prediction mode is “commonto C0, C1, and C2,” the basic reference image identification number 132and the basic motion vector information 133 are used for all the colorcomponents C0, C1, and C2. Otherwise, the basic reference imageidentification number 132 and the basic motion vector information 133are used as information for C0. Further, when the inter prediction modeis common to C1 and C2, the extended reference image identificationnumber 134 and the extended motion vector information 135 common to theC1 and C2 components are decoded (Step S149). When different modes areused for each of C0, C1, and C2, the extended reference imageidentification number 134 and the extended motion vector information 135are decoded for each of C1 and C2 (Steps S150, S151, and S152). Sincethe macroblock type/sub-macroblock type 106, the reference imageidentification number, and the motion vector information are determinedfor each of the color components through the above-mentioned process,the determined macroblock type/sub-macroblock type 106, reference imageidentification number, and motion vector information are output to themotion compensation prediction unit 102 to obtain a motion compensationprediction image of each of the color components.

As in the case of the data sequence of the bit stream as illustrated inFIG. 36, when the inter prediction mode-sharing identification flag 123indicates that the inter prediction mode is “common to C1 and C2,” theextended macroblock type 130, the extended sub-macroblock type 131, theextended reference identification number 134, and the extended motionvector information 135 are information common to C1 and C2. Theoperations of the video encoding device and the video decoding device,which receive as an input and output the video stream according to thedata sequence illustrated in FIG. 36, are the same as those in the caseof FIG. 34.

In the ninth embodiment of the present invention, each of the macroblocktype/sub-macroblock type 106, the motion vector 137, and the referenceimage can be set different for each of the color components.Alternatively, the macroblock type/sub-macroblock type 106 and thereference image common to the color components are used, while switchingis allowed between the use of the motion vector 137 common to the threecomponents, the use of the motion vector 137 different for each of thecomponents, and the use of the optimal motion vector 137 common to C1and C2 and that for C0. The data sequence of the bit stream in this casefollows that illustrated in FIG. 39 or 41. Even in this case, when theinter prediction mode-sharing identification flag 123 indicates that theinter prediction mode is “common to C1 and C2,” the extended motionvector information 135 is common to C1 and C2.

Tenth Embodiment

In the tenth embodiment, a method of encoding the input motion vector137 in the variable length encoding unit 11 of the encoding devicedescribed in the seventh embodiment of the present invention and thenmultiplexing the encoded motion vector 137 in the bit stream, and amethod of decoding the motion vector 137 from the bit stream in thevariable length decoding unit 25 of the corresponding decoding devicewill be described.

FIG. 45 illustrates a configuration of a motion vector encoding unit forencoding the motion vector 137, which corresponds to a part of thevariable length encoding unit 11 of the encoding device illustrated inFIG. 30.

A method of multiplexing the motion vectors 137 of the three colorcomponents (C0, C1, and C2) in the bit stream in the order of C0, C1,and C2 will be described.

The motion vector 137 of C0 is denoted by mv0. In a motion vectorprediction unit 111, a prediction vector (mvp0) of the motion vector 137of C0 is obtained. As illustrated in FIG. 46, motion vectors (mvA0,mvB0, and mvC0) of the neighboring blocks (blocks A, B, and C of FIG.46) of the block in which the motion vector (mv0) to be encoded islocated are obtained from the memories. It is assumed that the motionvectors 137 of the blocks A, B, and C have already been multiplexed inthe bit stream. A median value of mvA0, mvB0, and mvC0 is calculated asmvp0. The calculated prediction vector mvp0 and the motion vector mv0 tobe encoded are input to a difference motion vector calculation unit 112.The difference motion vector calculation unit 112 calculates adifference vector (mvd0) between mv0 and mvp0. The calculated differencevector mvd0 is input to a difference motion vector variable lengthencoding unit 113 to be entropy-coded by means such as Huffman encodingor arithmetic coding.

Next, a motion vector (mv1) of C1 is encoded. In the motion vectorprediction unit 111, a prediction vector (mvp1) of the motion vector 137of C1 is obtained. As illustrated in FIG. 46, motion vectors (mvA1,mvB1, and mvC1) of the neighboring blocks of the block in which themotion vector (mv1) to be encoded is located, and the motion vector(mv0) of C0 at the same position as that of the block in which mv1 islocated are obtained from the memories 16. It is assumed that the motionvectors 137 of the blocks A, B, and C have already been multiplexed inthe bit stream. A median value of mvA1, mvB1, mvC1 and mv0 is calculatedas mvp1. The calculated prediction vector mvp1 and the motion vector mv1to be encoded are input to the difference motion vector calculating unit112 to calculate a difference motion vector (mvd1=mv1−mvp1) between mv1and mvp1. The calculated mvd1 is input to the difference motion vectorvariable length encoding unit 113 to be entropy-coded by means such asHuffman encoding or arithmetic coding.

Next, a motion vector (mv2) of C2 is encoded. In the motion vectorprediction unit 111, a prediction vector (mvp2) of the motion vector 137of C2 is obtained. As illustrated in FIG. 46, motion vectors (mvA2,mvB2, and mvC2) of the neighboring blocks of the block in which themotion vector (mv2) to be encoded is located, and the motion vectors(mv1 and mv2) of C0 and C1 at the same position as that of the block inwhich mv2 is located are obtained from the memories 16. A median valueof mvA2, mvB2, mvC2, mv0, and mv1 is calculated as mvp2. The calculatedprediction vector mvp2 and the motion vector mv2 to be encoded are inputto the difference motion vector calculating unit 112 to calculate adifference motion vector (mvd2=mv2−mvp2) between mv2 and mvp2. Thecalculated mvd2 is input to the difference motion vector variable lengthencoding unit 113 to be entropy-coded by means such as Huffman encodingor arithmetic coding.

FIG. 47 illustrates a configuration of a motion vector decoding unit 250for decoding the motion vector 137, which corresponds to a part of thevariable length decoding unit 25 of the decoding device illustrated inFIG. 31.

The motion vector decoding unit 250 decodes the motion vectors 137 ofthe three color components multiplexed in the video stream 22 in theorder of C0, C1, and C2.

A difference motion vector variable length decoding unit 251 extractsthe difference motion vectors (mvd0, mvd1, and mvd2) of the three colorcomponents (C0, C1, and C2) multiplexed in the video stream 22 toperform variable length decoding on the extracted difference motionvectors.

A motion vector prediction unit 252 calculates the prediction vectors(mvp0, mvp1, and mvp2) of the motion vectors 137 of C0, C1, and C2. Amethod of calculating the prediction vectors is the same as thatperformed in the motion vector prediction unit 111 of the encodingdevice.

Next, a motion vector calculating unit 253 adds the difference motionvector and its prediction vector to calculate the motion vector(mvi=mvdi+mvpi (i=0, 1, or 2)). The calculated motion vector 137 isstored in the memories 16 to be used as a prediction vector candidate.

According to this tenth embodiment, in encoding and decoding the motionvector, the motion vectors of the blocks of the same color component,which neighbor the block in which the motion vector to be encoded islocated, and the motion vectors of the blocks of the different colorcomponents at the same position as that of the block in which the motionvector to be encoded is located are used as the prediction vectorcandidates. Therefore, when the motion vector has no continuity with themotion vectors of the neighboring blocks in the same color component ina boundary area of an object or the like, the effect of enhancing theprediction efficiency of the motion vector to reduce the amount of codesof the motion vector can be obtained by using the motion vectors of theblocks of the different colors at the same position as the predictionvector candidates.

Eleventh Embodiment

In the eleventh embodiment, an embodiment of another encoding device andanother decoding device which derive from the encoding device and thedecoding device described in the seventh embodiment of the presentinvention will be described. The encoding device and the decoding deviceaccording to the eleventh embodiment determine, based on a predeterminedcontrol signal, whether or not the color components C0, C1, and C2 inthe macroblock are encoded according to individual header information,and multiplex information of the control signal in the video stream 22.The encoding device and the decoding device according to the eleventhembodiment are characterized in that there is provided means ofmultiplexing the header information required to decode the componentsC0, C1, and C2 in the video stream based on the control signal andefficiently encoding a skipped (or not encoded) macroblock when there isno motion vector or transform coefficient to be transmitted based on thecontrol signal.

In the conventional MPEG video encoding methods including AVC,highly-efficient encoding with a minimized amount of codes of amacroblock to be encoded is realized by particularly signaling a casewhere there is no encoded information to be transmitted for themacroblock to be encoded. For example, in encoding a certain macroblock,when image data at exactly the same position on the reference image usedfor motion compensation prediction is used as a predicted image(specifically, the motion vector is zero) and all the quantizedtransform coefficients in the macroblock become zero as a result oftransform and quantization of the obtained prediction error signal, anamplitude of the obtained prediction error signal is zero even if thedecoding device performs inverse quantization. Therefore, there is notransform coefficient data to be transmitted to the decoding device. Inaddition, in consideration of the assumption that the motion vector iszero, a specific macroblock type that “the motion vector zero and notransform data” can be defined. Such a macroblock is conventionallyreferred to as skipped macroblock or not encoded macroblock. The skippedmacroblock is particularly signaled not to transmit unnecessaryinformation. In the AVC, the motion vector is determined by theconditions that “the 16×16 prediction of FIG. 32A is performed andprediction values (corresponding to the prediction vectors mvp0, mvp1,and mvp2) used for encoding motion vectors are equal to actual motionvectors.” If a macroblock satisfies the above-mentioned conditions andthere is no transform coefficient data to be transmitted, the macroblockis regarded as a skipped macroblock. In the conventional AVC, inencoding the skipped macroblock, any one of the following two methods isto be selected according to the employed variable length encodingmethod.

-   Method 1: the number of skipped macroblocks (RUN length) contiguous    in a slice is counted to perform variable length coding on the RUN    length.-   Method 2: an indication flag indicating whether or not the    macroblock is a skipped macroblock is encoded for each macroblock.

Bit stream syntaxes according to the respective methods are illustratedin FIGS. 48A and 48B. FIG. 48A illustrates the case where adaptiveHuffman encoding is used as the variable length coding method (method1), and FIG. 48B illustrates the case where adaptive arithmetic codingis used (method 2). A skipped macroblock is signaled by mb_skip_run inthe method 1 and by mb_skip_flag in the method 2. Encoded data of then-th (non-skipped) macroblock is denoted by MB(n). It should be hereinnoted that mb_skip_run or mb_skip_flag is allocated to a macroblockobtained by gathering the components C0, C1, and C2 as one unit.

On the other hand, in the encoding device and decoding device accordingto the eleventh embodiment, there is provided a method of changingheader information including the motion vector and the like for each ofthe components C0, C1, and C2 according to the state of theabove-mentioned control signal, specifically, a signal corresponding tothe inter prediction mode-sharing identification flag 123 described inthe seventh embodiment of the present invention, to signal a skippedmacroblock for each of the components C0, C1, and C2. Specific examplesof the bit stream syntax are illustrated in FIGS. 49 and 50.

FIG. 49 illustrates a configuration of macroblock encoding data, whichis output from the encoding device according to the eleventh embodimentto be input to the decoding device according to the eleventh embodiment,and FIG. 50 illustrates a detailed configuration of encoding data in Cncomponent header information illustrated in FIG. 49. Hereinafter, forthe description of the effect of this bit stream configuration, anoperation of the decoding device for receiving the bit stream to restorethe video signal will be mainly described. For the description of theoperation of the decoding device, FIG. 31 is referred to.

The definition of the inter prediction mode-sharing identification flag123 in the seventh embodiment of the present invention is extended to berepresented as a macroblock header-sharing identification flag 123 c.The macroblock header-sharing identification flag 123 c regards C0component header information 139 a as basic macroblock headerinformation to instruct the multiplexing of only the C0 component headerinformation 139 a as header information commonly used for the C1 and C2components or the individual multiplexing of each of C1 component headerinformation 139 b and C2 component header information 139 c as extendedheader information. The macroblock header-sharing identification flag123 c is extracted from the video stream 22 and decoded by the variablelength decoding unit 25. When the flag 123 c instructs the multiplexingof the C0 component header information 139 a alone as header informationcommonly used for the C1 and C2 components, all the components C0, C1,and C2 in the macroblock are decoded by using the C0 component headerinformation 139 a. When the flag 123 c instructs the individualmultiplexing of each of the C1 component header information 139 b andthe C2 component header information 139 c as extended headerinformation, the decoding is performed by using the header information139 a to 139 c proper to the respective color components C0, C1, and C2in the macroblock. Hereinafter, this regard will be described further indetail as a process implemented on the macroblock basis.

1. Multiplexing of the C0 Component Header Information Alone

When the macroblock header-sharing identification flag 123 c indicatesthe multiplexing of the C0 component header information 139 a alone asheader information commonly used for the C1 and C2 components, themacroblock is decoded for all the components C0, C1, and C2 based onvarious macroblock header information contained in the C0 componentheader information 139 a. In this case, since C0 component skipinstruction information 138 a and the C0 component header information139 a are commonly used for the C1 and C2 components, skip instructioninformation (138 b and 138 c) and header information (139 b and 139 c)for the C1 and C2 components are not multiplexed in the bit stream.

The variable length decoding unit 25 first decodes and evaluates the C0component skip instruction information 138 a. When the C0 component skipinstruction information 138 a indicates “skip,” the C0 component headerinformation 139 a is regarded as not being encoded and transformcoefficient validity indication information 142 in the C0 componentheader information 139 a is regarded as zero (no encoded transformcoefficient). As a result, C0 component transform coefficient data, C1component transform coefficient data, and C2 component transformcoefficient data (140 a to 140 c) are all regarded as not being encoded.Therefore, all the quantized transform coefficients 10 in the macroblockare output as zero. Further, according to the definition of the skippedmacroblock, the motion vectors 137 of all the components C0, C1, and C2are set to the same value to be output.

When the C0 component skip instruction information 138 a indicatesnon-“skip,” the C0 component header information 139 a is regarded asbeing present and is decoded. When the macroblock type 128 b in the C0component header information 13 9 a indicates intra encoding, the intraprediction mode 141, the transform coefficient validity indicationinformation 142, and (if the transform coefficient validity indicationinformation 142 is not zero) the quantization parameter are decoded. Ifthe transform coefficient validity indication information 142 is notzero, the C0 component, C1 component, and C2 component transformcoefficient data (140 a to 140 c) are decoded to be output in the formof the quantized transform coefficients 10. If the transform coefficientvalidity indication information 142 is zero, the C0 component, C1component, and C2 component transform coefficient data (140 a to 140 c)are all regarded as being zero. Then, all the quantized transformcoefficients 10 in the macroblock are output as zero. When themacroblock type 128 b indicates the inter encoding, the sub-macroblocktype 129 b is decoded as needed. Further, the reference imageidentification number 132 b, the motion vector information 133 b, thetransform coefficient validity indication information 142, and (if thetransform coefficient validity indication information 142 is not zero)the quantization parameter 21 are decoded. If the transform coefficientvalidity indication information 142 is not zero, the C0 component, C1component, and C2 component transform coefficient data (140 a to 140 c)are decoded to be output in the form of the quantized transformcoefficients 10. If the transform coefficient validity indicationinformation 142 is zero, the C0 component, C1 component, and C2component transform coefficient data (140 a to 140 c) are all regardedas being zero. Then, all the quantized transform coefficients 10 in themacroblock are output as zero. The decoding of the macroblock accordingto a predetermined processing procedure by using the output from thevariable length decoding unit 25 through the above-mentioned operationis the same as described in the seventh embodiment of the presentinvention.

2. Multiplexing of Corresponding Header Information for each of theComponents C0, C1, and C2

When the macroblock header-sharing identification flag 123 c indicatesthe multiplexing of each of the C1 component header information 139 band the C2 component header information 139 c as extended headerinformation independently of the C0 component header information 139 a,each color component image is decoded based on various macroblock headerinformation contained in each of the corresponding header information(139 a to 139 c) for each of the components C0, C1, and C2. In thiscase, the skip instruction information (138 b and 138 c) and the headerinformation (139 b and 139 c) for the C1 and C2 components aremultiplexed in the bit stream.

The variable length decoding unit 25 first decodes and evaluates the C0component skip instruction information 138 a. When the C0 component skipinstruction information 138 a indicates “skip,” the C0 component headerinformation 139 a is regarded as not being encoded and the transformcoefficient validity indication information 142 in the C0 componentheader information 139 a is regarded as zero (no encoded transformcoefficient). As a result, the C0 component transform coefficient data140 a is regarded as not being encoded. Therefore, all the quantizedtransform coefficients 10 in the C0 component is output as zero(specifically, a value of the macroblock header-sharing identificationflag 123 c changes the relation between the C0 component skipinstruction information 138 a and the transform coefficient validityindication information 142). Further, the motion vector 137 of the C0component is set according to the definition in the case of the skippingof the C0 component to be output.

When the C0 component skip instruction information 138 a indicatesnon-“skip,” the C0 component header information 139 a is regarded asbeing present to be decoded. When the macroblock type 128 b in the C0component header information 139 a indicates intra encoding, the intraprediction mode 141 (spatial pixel prediction mode using the neighboringpixels of the pixel to be predicted in the frame as a prediction value),the transform coefficient validity indication information 142, and (ifthe transform coefficient validity indication information 142 is notzero) the quantization parameter 21 are decoded. If the transformcoefficient validity indication information 142 is not zero, the C0component transform coefficient data is decoded to be output in the formof the quantized transform coefficient 10. If the transform coefficientvalidity indication information 142 is zero, the C0 component transformcoefficient data are all zero. When the macroblock type indicates theinter encoding, the sub-macroblock type is decoded as needed. Further,the reference image identification number, the motion vectorinformation, the transform coefficient validity indication information142, and (if the transform coefficient validity indication information142 is not zero) the quantization parameter are decoded. If thetransform coefficient validity indication information 142 is not zero,the C0 component transform coefficient data is decoded to be output inthe form of the quantized transform coefficient 10. If the transformcoefficient validity indication information 142 is zero, the C0component transform coefficient data are all regarded as being zero. Theabove-mentioned processing procedure is performed in the same manner onC1 and C2.

The decoding of each of the components C0, C1, and C2 in the macroblockaccording to a predetermined processing procedure by using the outputfrom the variable length decoding unit 25 through the above-mentionedoperation is the same as described in the seventh embodiment of thepresent invention.

The operation in the decoding device has mainly been described. Byconfiguring the bit stream as described above, the following effects areobtained. First, there is only one set of header information (FIG. 50)available for each macroblock in the conventional AVC. The intra/interdetermination is required to be performed for a set of all thecomponents C0 to C2 according to the header information to implement theencoding. On the other hand, as in the 4:4:4 format, for a case where asignal component corresponding a luminance signal which transmits thecontents of the image signal is equally contained in the three colorcomponents, a variation sometimes occurs in signal characteristics dueto the superposition of a noise on the input video signal for each ofthe components, or the like. Therefore, the collective encoding of allthe components C0 to C2 is not always optimal. On the premise of the bitstream configurations in FIGS. 49 and 50 according to the eleventhembodiment, by the macroblock header-sharing identification flag 123 c,the encoding device can select the optimal encoding mode (the macroblocktype including the intra/inter encoding type), motion vector and thelike according to the signal characteristic for each of the colorcomponents C0 to C2 to implement the encoding, thereby enhancing theencoding efficiency. Moreover, since the encoding is conventionallyperformed on the macroblock basis, each macroblock being obtained bygathering all the components C0 to C2. Therefore, skipping anddetermination are performed on the condition that the encodedinformation of all the components are all absent. In the eleventhembodiment, however, the presence/absence of the encoded information isconfigured to be determined based on the skip instruction information138 for each component. Therefore, for a case where only a certaincomponent is to be skipped while the other components are not to beskipped, it is not necessary to determine that all the components arenot to be skipped. Accordingly, the amount of codes can be moreefficiently allocated. In the encoding device, the value of the skipinstruction information 138 is determined in the variable lengthencoding unit 11 according to the definition of the skipped macroblockuniquely defined by both the encoding device and the decoding device asdescribed in this paragraph based on the quantized transform coefficientdata 10, the motion vector 137, the reference image identificationnumber 132 b, and the macroblock type/sub-macroblock type 106.

Note that the bit stream handled by the encoding device and the decodingdevice according to the eleventh embodiment may be configured asillustrated in FIG. 51. In this example, the skip instructioninformation (138), the header information (139 a to 139 c), and thetransform coefficient data (140 a to 140 c) are collectively arrangedfor each of the components C0, C1, and C2. In the skip instructioninformation 138, each of the states of the color components C0, C1, andC2 may be arranged as one-bit code symbol. Alternatively, eight statesmay be collectively encoded into one code symbol. When the colorcomponents have a high correlation in the skip state, the code symbolsare gathered to appropriately define a context model of the arithmeticcoding (described in a twelfth embodiment below) to enable theenhancement of the encoding efficiency of the skip instructioninformation 138 itself.

Note that the macroblock header-sharing identification flag 123 c may bemultiplexed in the bit stream in units of arbitrary data layers such asthe macroblock, the slice, the picture, and the sequence. When there issteadily a difference in signal property between the color components inthe input signal, efficient encoding can be performed with less overheadinformation by configuring the macroblock header-sharing identificationflag 123 c to be multiplexed for each sequence. Moreover, the macroblockheader-sharing identification flag 123 c is configured to be multiplexedfor each picture. With this configuration, a header is commonly used forthe color components in an I-picture having less variations inmacroblock type, whereas a different individual header is used for eachcolor component in P- and B-pictures having greater variations inmacroblock type. As a result, the effect of improving the balancebetween the encoding efficiency and a calculation load is expected to beobtained. Further, it is believed that the switching in the picturelayer is desirable even in view of the encoding control of the videosignal having a property varying for each picture, for example, for ascene change. When the macroblock header-sharing identification flag 123c is multiplexed for each macroblock, the amount of codes per macroblockincreases. On the other hand, it is possible to control whether or notto use the common header information based on the signal state of eachof the color components for each macroblock. As a result, the encodingdevice which better follows a local variation in signal of the image toimprove the compression efficiency can be configured.

When the encoding type corresponding to the picture type is switched inthe slice level as in the AVC, the following method is conceived. Themacroblock header-sharing identification flag 123 c is multiplexed foreach slice. Then, when the macroblock header-sharing identification flag123 c indicates that the header information is “common to C0, C1, andC2,” the bit stream is configured to allow the slice to contain all theencoded information of the three color components. On the other hand,when the macroblock header-sharing identification flag 123 c indicatesthat the header information is not “common to C0, C1, and C2,” the bitstream is configured to allow one slice to contain the information ofone color component. This state is illustrated in FIG. 52. In FIG. 52,the macroblock header-sharing indication flag 123 c also serves as sliceconfiguration identification information indicating whether “a currentslice contains all the encoded information of the three colorcomponents” or “a current slice contains the encoded information of acertain specific color component.” It is apparent that the sliceconfiguration identification information may be provided independentlyof the macroblock header-sharing identification flag 123 c. When theslice configuration identification information indicates that “a currentslice contains the encoded information of a certain specific colorcomponent,” the identification also indicates “which of C0, C1, and C2is the specific color component.” For the switching between the commonuse of one macroblock header for the components C0, C1, and C2 (a slicecontaining C0, C1, and C2) and the individual multiplexing of amacroblock for each of the components C0, C1, and C2 (a slice C0, aslice C1, and a slice C2), when two types of slice are present in asingle picture, the slice C0, the slice C1, and the slice C2 arerestricted to be multiplexed in the bit stream in a set as data obtainedby encoding the macroblock at always the same position in the screen.Specifically, first_mb_in_slice contained in the slice header toindicate the intra-picture position of the head macroblock in the slicehas always the same value in one set of the slice C0, the slice C1, andthe slice C2. Moreover, the number of macroblocks contained in one setof the slice C0, the slice C1, and the slice C2 is the same. This stateis illustrated in FIG. 53. By providing such a restriction on theconfiguration of the bit stream, the encoding device can adaptivelyselect the encoding method with a higher encoding efficiency for theslice containing C0, C1, and C2 or the set of the slice C0, the sliceC1, and the slice C2 according to the local property of the signal inthe picture. The decoding device can receive the bit stream efficientlyencoded in the above-mentioned manner to reproduce the video signal. Forexample, assuming that the video stream 22 input to the decoding deviceillustrated in FIG. 31 has the configuration as described above, thevariable length decoding unit 25 decodes the slice configurationidentification information from the bit stream each time the slice datais input. Then, the variable length decoding unit 25 identifies the typeof slice to be decoded from the slice types illustrated in FIG. 52. Whenit is determined, based on the slice configuration identificationinformation, that the encoded data is configured as a set of the sliceC0, the slice C1, and the slice C2, the state of the inter predictionmode-sharing identification flag 123 (or the macroblock header-sharingidentification flag 123 c) may be determined as “use a differentindividual inter prediction mode (or macroblock header) for each of C0,C1, and C2” to perform the decoding operation. Since it is ensured thatthe value of first_mb_in_slice of each slice and the number ofmacroblocks in the slice are always the same, the decoding process canbe performed without generating an overlap or a gap with the slicecontaining C0, C1, and C2 on the picture based on the same value offirst_mb_in_slice and the same number of macroblocks in the slice.

In order to prevent the encoding efficiency from being lowered byproviding such a restriction when the properties of the signals of therespective slices C0, C1, and C2 greatly differ from each other,identification information which enables the selection ofpermission/non-permission of the presence of slices each including theslice configuration identification information having different valuesin the picture at the picture level or the sequence level may beprovided.

Twelfth Embodiment

In the twelfth embodiment, an embodiment of another encoding device andanother decoding device which derive from the encoding device and thedecoding device described in the eleventh embodiment of the presentinvention will be described. When the adaptive arithmetic coding isemployed to encode each of the components C0, C1, and C2 in themacroblock, the encoding device and the decoding device according to thetwelfth embodiment adaptively perform the switching between the sharingof a symbol occurrence probability used for arithmetic coding and itslearning process in all the components, and the separate use of thesymbol occurrence probability and the learning process for each of thecomponents, based on the identification information multiplexed in thebit stream.

The twelfth embodiment of the present invention differs from theeleventh embodiment of the present invention only in the processperformed in the variable length encoding unit 11 of FIG. 30 for theencoding device and the process performed in the variable lengthdecoding unit 25 of FIG. 31 for the decoding device. The remainingoperation is as described in the eleventh embodiment of the invention.Hereinafter, an arithmetic coding process and an arithmetic decodingprocess which are important characteristics of the twelfth embodiment ofthe invention will be described in detail.

1. Encoding Process

FIG. 54 illustrates an internal configuration related with thearithmetic coding process in the variable length encoding unit 11, andFIGS. 55 and 56 are flowcharts, each illustrating an operation flow ofthe arithmetic coding process.

The variable length encoding unit 11 in the twelfth embodiment of theinvention includes a context model determining unit 11 a, a binarizationunit 11 b, an occurrence probability generation unit 11 c, an encodingunit 11 d, and a memory 11 g. The context model determining unit 11 adetermines a context model (described below) defined for each data typesuch as the motion vector 137, the reference image identification number132 b, the macroblock type/sub-macroblock type 106, the intra predictionmode 141, or the quantized transform coefficient 10, which is data to beencoded. The binarization unit 11 b converts multivalued data intobinary data according to a binarization rule determined for each of thetypes of data to be encoded. The occurrence probability generation unit11 c provides an occurrence probability of a value (0 or 1) of each binobtained after the binarization. The encoding unit 11 d executes thearithmetic coding based on the generated occurrence probability. Thememory 11 g stores occurrence probability information. Various datainput to the variable length encoding unit 11 as data to be encoded,such as the motion vector 137, the reference image identification number132 b, the macroblock type/sub-macroblock type 106, the intra predictionmode 141, and the quantized transform coefficient 10, are input to thecontext model determining unit 11 a. An output from the encoding unit 11d corresponds to information for the macroblock in the video stream 22.

(1) Context Model Determining Process (Step S160 in FIG. 55)

The context model is obtained by modeling the dependency on the otherinformation which causes a variation in occurrence probability of aninformation source symbol. By switching a state of the occurrenceprobability to correspond to the dependency, the encoding more adaptiveto an actual occurrence probability of the symbol is enabled. FIG. 57illustrates the concept of the context model (ctx). Note that theinformation source symbol is binary in FIG. 57, but the informationsource symbol may be multivalued. Options 0 to 2 of FIG. 57 as thecontext model ctx are defined supposing that the state of the occurrenceprobability of an information source symbol which uses the ctx willchange according to the condition. In the case of video encoding in thetwelfth embodiment of the present invention, the value of ctx isswitched according to the dependency between the encoded data in acertain macroblock and the encoded data of the neighboring macroblocks.For example, FIG. 58 illustrates an example of the context model for themotion vector of the macroblock, which is disclosed in “VideoCompression Using Context-Based Adaptive Arithmetic Coding” by D. Marpeet al., International Conference on Image Processing 2001. In FIG. 58, amotion vector of a block C is to be encoded (more precisely, aprediction difference value mvd_(k)(C) obtained by predicting the motionvector of the block C from the neighboring blocks is encoded), andctx_mvd(C,k) indicates a context model. A motion vector predictiondifference value in a block A is denoted by mvd_(k)(A) and a motionvector prediction difference value in a block B is denoted bymvd_(k)(B), which are used for defining a switching evaluation valuee_(k)(C) of the context model. The evaluation value e_(k)(C) indicates avariation between the neighboring motion vectors. Generally, when thevariation is small, mvd_(k)(C) tends to be small. On the other hand,when the variation is large, mvd_(k)(C) tends to be large. Therefore, itis desirable that a symbol occurrence probability of mvd_(k)(C) beadapted based on e_(k)(C). A set of variations of the occurrenceprobability is a context model. In this case, it can be said that thereare three occurrence probability variations.

Besides, a context model is predefined for each data to be encoded suchas the macroblock type/sub-macroblock type 106, the intra predictionmode 141, and the quantized transform coefficient 10 to be shared by theencoding device and the decoding device. The context model determiningunit 11 a performs a process of selecting the predefined model based onthe type of the data to be encoded as described above (the selection ofthe occurrence probability variation from those in the context modelcorresponds to an occurrence probability generating process described in(3) below).

(2) Binarization Process (Step S161 in FIG. 55)

The context model is determined according to each bin (binary position)in a binary sequence obtained by binarizing the data to be encoded inthe binarization unit 11 b. According to the binarization rule, avariable length transform into a binary sequence is performed accordingto a rough distribution of possible values for each of the encoded data.For the binarization, the number of divisions of a probability numberline can be reduced to advantageously simplify the calculation and toenable the context model to be streamlined by encoding the data to beencoded for each bin, which can otherwise be multivalued, rather than byarithmetic coding.

(3) Occurrence Probability Generating Process (Step S162 in FIG. 55 (aDetailed Process in Step S162 is Illustrated in FIG. 56))

Through the above-mentioned processes (1) and (2), the binarization ofthe multivalued data to be encoded and the setting of the context modelused for each bin are completed to complete the preparation forencoding. Subsequently, the occurrence probability generation unit 11 cperforms a process of generating an occurrence probability state usedfor the arithmetic coding. Each context model contains the occurrenceprobability variations for each of values 0 and 1. Therefore, asillustrated in FIG. 54, the process is performed referring to thecontext model 11 f determined in Step S 160. The evaluation value forselecting the occurrence probability as indicated by e_(k)(C) of FIG. 58is determined. According to the determined evaluation value, theoccurrence probability variation to be used for the current encoding isdetermined from the context model options to be referred to (Step S162 ain FIG. 56). Further, the variable length encoding unit 11 according tothe twelfth embodiment includes the occurrence probability informationstorage memory 11 g which has the mechanism of storing an occurrenceprobability state 11 h sequentially updated in the encoding process,separately for each of the color components. The occurrence probabilitygeneration unit 11 c determines the selection of the occurrenceprobability state 11 h to be used for the current encoding from thosestored separately for each of the color components C0 to C2 or thesharing of the occurrence probability state 11 h for the C0 component bythe C1 and C2 components based on a value of an occurrence probabilitystate parameter-sharing identification flag 143, to thereby determinethe occurrence probability state 11 h actually used for the encoding(Steps S162 b to S162 d in FIG. 56).

Since the occurrence probability state parameter-sharing identificationflag 143 is required to be multiplexed in the bit stream to enable thesame selection in the decoding device. Such a configuration provides thefollowing effect. For example, taking FIG. 58 as an example, when themacroblock header-sharing identification flag 123 c indicates that theC0 component header information 139 a is used even for the othercomponents, one evaluation value e_(k)(C) in FIG. 58 is determined permacroblock if the macroblock type 128 b indicates the 16×16 predictionmode. In this case, the occurrence probability state prepared for the C0component is always used. On the other hand, when macroblockheader-sharing identification flag 123 c indicates that the headerinformation (139 a to 139 c) corresponding to the respective componentsare used, the value e_(k)(C) in FIG. 58 can have three variations permacroblock if the macroblock type 128 b indicates the 16×16 predictionmode for all of C0, C1, and C2. The encoding unit 11 d in the laterstage has two options for each variation. Specifically, any one of thecommon use and update of the occurrence probability state 11 h preparedfor the C0 component, and the individual use and update of theoccurrence probability state 11 h prepared for each of the colorcomponents can be selected. With the former option, when the componentsC0, C1, and C2 have nearly the same motion vector distribution, there isa possibility that the common use and update of the occurrenceprobability state 11 h increases a learning frequency to enable betterlearning of the occurrence probability of the motion vector. With thelatter option, when the components C0, C1, and C2 have different motionvector distributions, there is a possibility that the individual use andupdate of the occurrence probability state 11 h can reduce mismatches inlearning to enable better learning of the occurrence probability of themotion vector. Since the video signal is non-stationary, the efficiencyof the arithmetic coding can be enhanced by enabling the adaptivecontrol as described above.

(4) Encoding Process

Since the occurrence probability of each of the values 0 and 1 on theprobability number line required for the arithmetic coding processthrough the process (3) can be obtained, the arithmetic coding isperformed in the encoding unit 11 d according to the process describedin the conventional examples (Step S163 in FIG. 55). The actual encodedvalue (0 or 1) 11 e is fed back to the occurrence probability generationunit 11 c to count an occurrence frequency of 0 or 1 for updating theused occurrence probability state 11 h (Step S164). For example, it isassumed that the occurrence probabilities of 0 and 1 in the occurrenceprobability variation are 0.25 and 0.75 after the encoding process ofone hundred bins has been performed using a specific occurrenceprobability state 11 h. In this case, when 1 is encoded by using thesame occurrence probability variation, an appearance frequency of 1 isupdated to change the occurrence probabilities of 0 and 1 to 0.247 and0.752, respectively. This mechanism enables the efficient encodingadaptive to the actual occurrence probability. The encoded value 11 e isan output from the variable length encoding unit 11, and is output fromthe encoding device as the video stream 22.

FIG. 59 illustrates an internal configuration related with thearithmetic decoding process in the variable length decoding unit 25, andFIG. 60 is a flowchart illustrating an operation flow of the arithmeticdecoding process.

The variable length decoding unit 25 according to the twelfth embodimentincludes the context model determining unit 11 a, the binarization unit11 b, the occurrence probability generation unit 11 c, a decoding unit25 a, and the memory 11 g. The context model determining unit 11 aspecifies the type of data to be decoded such as the motion vector 137,the reference image identification number 132 b, the macroblocktype/sub-macroblock type 106, the intra prediction mode 141, and thequantized transform coefficient 10 to determine a context model definedcommonly to the encoding device for each data type. The binarizationunit 11 b generates a binarization rule determined based on the type ofthe data to be decoded. The occurrence probability generation unit 11 cprovides an occurrence probability of each bin (0 or 1) according to thebinarization rule and the context model. The decoding unit 25 a executesthe arithmetic decoding based on the generated occurrence probability todecode the data such as the motion vector 137, the reference imageidentification number 132 b, the macroblock type/sub-macroblock type106, the intra prediction mode 141, and the quantized transformcoefficient 10 based on the resultant binary sequence and theabove-mentioned binarization rule. The memory 11 g stores the occurrenceprobability information. The internal components 11 a to 11 c and 11 gare the same as those of the variable length encoding unit 11 of FIG.54.

(5) Context Model Determining Process, Binarization Process, andOccurrence Probability Generating Process

These processes are the same as the processes (1) to (3) performed inthe encoding device. It is assumed that the occurrence probability stateparameter-sharing identification flag 143 has already been extractedfrom the video stream 22, which is not shown in the drawings.

(6) Arithmetic Decoding Process

Since the occurrence probability of a bin to be decoded is determined bythe processes (1) to (6), the decoding unit 25 a decodes a value of thebin according to a predetermined arithmetic decoding process (Step S166in FIG. 60). A restored value 25 b of the bin is fed back to theoccurrence probability generation unit 11 c to count an occurrencefrequency of 0 or 1 to update the used occurrence probability state 11 h(Step S164). The decoding unit 25 a confirms the matching with thebinary sequence pattern determined based on the binarization rule eachtime the restored value of each bin is determined to output a data valueindicated by the matching pattern as a decoded data value (Step S167).Unless the decoded data is determined, the process returns to Step S166to continue the decoding process.

According to the encoding device including the arithmetic coding processand the decoding device including the arithmetic decoding process in theabove-mentioned configurations, in adaptively performing arithmeticcoding on the encoded information for each color component according tothe macroblock header-sharing identification flag 123 c, more efficientencoding is enabled.

The occurrence probability state parameter-sharing identification flag143 is multiplexed for any one of each macroblock, each slice, eachpicture, and each sequence, which is not particularly illustrated. Bymultiplexing the occurrence probability state parameter-sharingidentification flag 143 as a flag positioned in the higher-order datalayer such as the slice, the picture, or the sequence, overhead bits canbe reduced without multiplexing the occurrence probability stateparameter-sharing identification flag 143 at the macroblock level foreach time when a sufficiently high encoding efficiency is ensured by theswitching in the higher-order layer equal to or higher than the slice.

Moreover, the occurrence probability state parameter-sharingidentification flag 143 may be information determined in the decodingdevice based on relative information contained in a bit stream differentfrom the bit stream containing the flag 143.

In the twelfth embodiment, in performing arithmetic coding on themacroblock header-sharing identification flag 123 c on the macroblockbasis, a model illustrated in FIG. 61 is used for the context model 11f. In FIG. 61, it is assumed that a value of the macroblockheader-sharing identification flag 123 c in the macroblock X is IDC_(x).In encoding the macroblock header-sharing identification flag 123 c inthe macroblock C, the value IDC_(x) has the following three statesaccording to Formula in FIG. 61 based on a value IDC_(A) of themacroblock header-sharing identification flag 123 c in the macroblock Aand a value IDC_(B) of the macroblock header-sharing identification flag123 c in the macroblock B.

-   Value 0: both A and B are in a mode of “using a macroblock header    common to C0, C1, and C2.”-   Value 1: any one of A and B is in the mode of “using a macroblock    header common to C0, C1, and C2,” and the other one is in a mode of    “using different macroblock headers for C0, C1, and C2.”-   Value 2: both A and B are in the mode of “using different macroblock    headers for C0, C1, and C2.”

By encoding the macroblock header-sharing identification flag 123 c inthis manner, the arithmetic coding can be performed to be adapted to theencoded states of the neighboring macroblocks to enhance the encodingefficiency. It is apparent from the description of the operation of thedecoding device in the twelfth embodiment described above that thecontext model is defined in the same procedure for arithmetic decodingin the encoding device as well as in the decoding device.

In the twelfth embodiment, for the header information (the macroblocktype, the sub-macroblock type, the intra prediction mode, the referenceimage identification number, the motion vector, the transformcoefficient validity indication information, and the quantizationparameter) illustrated in FIG. 50, which is contained in the macroblockheader, the arithmetic coding is performed with the context mode definedfor each of the information types. As illustrated in FIGS. 62A and 62B,any of the context models is defined for the current macroblock C byreferring to corresponding information of the macroblocks A and B. Ifthe macroblock C is in the mode of “using a macroblock header common toC0, C1, and C2” and the macroblock B is in the mode of “using differentmacroblock headers for C0, C1, and C2” as illustrated in FIG. 62A,information of a specific color component selected from any of C0, C1,and C2 is used as the reference information for the definition of thecontext model.

For example, when the components C0, C1, and C2 correspond to the colorcomponents R, G, and B, a method of selecting the G component containingthe closest component to that of the luminance signal conventionallyused for encoding as a signal which well represents the structure of animage is conceived. This is because there are many cases where theinformation of the macroblock header is determined based on the Gcomponent for the encoding even in the mode of “using a macroblockheader common to C0, C1, and C2.”

On the other hand, in the reverse case, specifically, when themacroblock C is in the mode of “using different macroblock headers forC0, C1, and C2” whereas the macroblock B is in the mode of “using amacroblock header common to C0, C1, and C2,” as illustrated in FIG. 62B,it is necessary to encode and decode the header information of the threecolor components in the macroblock C. For encoding and decoding, as thereference information in the definition of the context model of theheader information of each of the color components, the headerinformation common to the three components is used as the same value forthe three components for the macroblock B. It is apparent that, when themacroblock header-sharing identification flag 123 c indicates the samevalue for all the macroblocks A, B, and C, the reference informationcorresponding to the macroblocks A, B, and C are always present.Therefore, these reference information are used.

It is apparent from the description of the operation of the decodingdevice in the twelfth embodiment described above that the context modelis defined in the same procedure to perform the arithmetic decoding inboth the encoding device and the decoding device. Moreover, after thedetermination of the context model to be used while specifying thecomponent whose information is referred to by the context model, theoccurrence probability state associated with the context model isupdated based on the state of the occurrence probability stateparameter-sharing identification flag 143.

Further, in the twelfth embodiment, the transform coefficient data ofeach of the components C0, C1, and C2 is arithmetically encodedaccording to the occurrence probability distribution of each of the datato be encoded. The encoded data for the three components are containedin the bit stream regardless of whether or not the macroblock header iscommonly used. Since the intra prediction or the inter prediction isperformed in the color space of the encoded input signal to obtain aprediction difference signal in the twelfth embodiment of the presentinvention, it is believed that a similar occurrence probabilitydistribution is obtained as a distribution of the transform coefficientdata obtained by an integer transform of the prediction differencesignal, regardless of the state of the neighborhood, for example,regardless of whether or not the macroblock header is commonly used, asillustrated in FIGS. 62A and 62B. Therefore, in the twelfth embodiment,a common context model is defined for each of the components C0, C1, andC2 to be used for the encoding and the decoding, regardless of whetheror not the macroblock header is commonly used for the three components.

It is apparent from the description of the operation of the decodingdevice in the twelfth embodiment described above that the context modelis defined in the same procedure to perform the arithmetic decoding inboth the encoding device and the decoding device. Moreover, after thedetermination of the context model to be used while specifying thecomponent whose information is referred to by the context model, theoccurrence probability state associated with the context model isupdated based on the state of the occurrence probability stateparameter-sharing identification flag 143.

Thirteenth Embodiment

The thirteenth embodiment of the present invention describes an exampleof another encoding device and another decoding device deriving fromthose described in the seventh to twelfth embodiments of the presentinvention. The encoding device and the decoding device in the thirteenthembodiment of the present invention are characterized in the followingconfigurations. The encoding device performs a color space transformprocess in an input stage of the encoding device described in theseventh to twelfth embodiments of the invention to transform a colorspace of a video signal, which is input to the encoding device afterimage capture, into an arbitrary color space suitable for the encoding,and then multiplexes information, which designates an inverse transformprocess for restoring the color space obtained at the time of imagecapture in the decoding device, in the bit stream. Then, the informationdesignating the inverse transform process is extracted from the bitstream to obtain a decoded image by the decoding device described in theseventh to twelfth embodiments of the invention. Thereafter, an inversecolor space transform is performed based on the information designatingthe inverse transform process.

FIG. 63 illustrates the configurations of the encoding device and thedecoding device according to the thirteenth embodiment. Referring toFIG. 63, the encoding device and the decoding device in the thirteenthembodiment will be described.

The encoding device in the thirteenth embodiment includes an encodingdevice 303 described in the seventh to twelfth embodiments of theinvention and a color space transform unit 301 in the previous stage ofthe encoding device 303. The color space transform unit 301 includes atleast one color space transform process. The color space transform unit301 selects the color space transform process to be used according tothe property of a video signal to be input or the system setting toperform the color space transform process on the input video signal.Then, the color space transform unit 301 transmits a transformed videosignal 302 obtained by the color space transform process to the encodingdevice 303. At the same time, the color space transform unit 301transmits information for identifying the used color space transformprocess as color space transform method identification information 304to the encoding device 303. After multiplexing the color space transformmethod identification information 304 in a bit stream 305 obtained bythe compression encoding of the transformed video signal 302 in themethod described in the seventh to twelfth embodiments of the inventionas a signal to be encoded, the encoding device 303 transmits the bitstream 305 to a transmission path or outputs the bit stream 305 to arecording device for recording on a recording medium.

As the prepared color space transform method, for example, there are thefollowing methods. Specifically, there are a transform of RGBconventionally used in the standard to YUV;

C0=Y=0.299×R+0.587×G+0.114×B

C1=U=−0.169×R−0.3316×G+0.500×B

C2=V=0.500×R−0.4186×G−0.0813×B,

a prediction between the color components;

C0=G′=G

C1=B′=B−f(G) (where f(G) is the result of a filtering process on the Gcomponent)

C2=R′=R−f(G),

and a transform of RGB to YCoCg;

C0=Y=R/2+G/2+B/4

C1=Co=R/2−B/2

C2=Cg=−R/4+G/2−B/4.

An input to the color space transform unit 301 is not required to belimited to RGB, and the transform process is not limited to theabove-mentioned three processes.

The decoding device according to the thirteenth embodiment includes adecoding device 306 in the seventh to twelfth embodiments of the presentinvention and an inverse color space transform unit 308 in thesubsequent stage of the decoding device 306. The decoding device 306receives the bit stream 305 as an input to extract and output the colorspace transform method identification information 304 from the bitstream 305 and also outputs a decoded image 307 obtained by theoperation of the decoding device described in the seventh to twelfthembodiments of the present invention. The inverse color space transformunit 308 includes an inverse transform process corresponding to each ofthe color space transform methods selectable in the above-mentionedcolor space transform unit 301. The transform executed in the colorspace transform unit 301 is specified based on the color space transformmethod identification information 304 output from the decoding device306 to perform the inverse transform process on the decoded image 307 torestore the color space of the video signal input to the decoding devicein the thirteenth embodiment.

According to the encoding device and the decoding device as in thethirteenth embodiment of the present invention, the optimal color spacetransform processes are performed in the previous stage of the encodingprocess and the subsequent stage of the decoding process on the videosignal to be encoded. As a result, the correlation contained in theimage signal composed of the three color components is removed prior tothe encoding to allow the encoding with a reduced redundancy.Accordingly, the compression efficiency can be enhanced. In theconventional standard encoding method such as the MPEG, the type ofcolor space of the signal to be encoded is limited to one, i.e., YUV. Inthe thirteenth embodiment, however, the color space transform unit 301and the inverse color space transform unit 308 are provided, and thecolor space transform method identification information 304 is containedin the bit stream 305. As a result, a restriction on the color space ofthe video signal to be encoded and input can be removed. At the sametime, the video signal can be encoded by using the optimal transformselected from a plurality of types of means for removing the correlationbetween the color components. The color space transform methodidentification information 304 may be multiplexed at the level such asthe picture, the slice, or the macroblock. For example, by multiplexingthe color space transform method identification information 304 on themacroblock basis, the transform which can remove the largest amount ofthe local correlation between the three color components can beselectively used to enhance the encoding efficiency.

The thirteenth embodiment of the present invention has been described onthe premise of the constant operations of the color space transform unit301 and the inverse color space transform unit 308. Alternatively,information which instructs to ensure the compatibility with theconventional standard without operating the color space transform unit301 and the inverse color space transform unit 301 may be encoded in thehigher-order layer such as the sequence.

Further alternatively, the color space transform unit 301 and theinverse color space transform unit 308 in the thirteenth embodiment mayeach be incorporated into the internal configurations of the encodingdevice and the decoding device in the seventh to twelfth embodiments ofthe present invention to perform the color space transform at theprediction difference signal level. The encoding device thus configuredis illustrated in FIG. 64, whereas the decoding device thus configuredis illustrated in FIG. 65. The encoding device in FIG. 64 includes atransform unit 310 in place of the orthogonal transform unit 8 and aninverse transform unit 312 in place of the inverse orthogonal transformunit 13, whereas the decoding device in FIG. 65 includes the inversetransform unit 312 in place of the inverse orthogonal transform unit 13.

The transform unit 310 first selects the optimal transform process fromthe plurality of color space transform processes to implement the colorspace transform as described above as the process in the color spacetransform unit 301, for the prediction difference signal 4 of thecomponents C0, C1, and C2, which is output from the encoding modedetermining unit 5. Thereafter, the transform unit 310 executes atransform corresponding to that performed in the orthogonal transformunit 8 for the result of the color space transform. The color spacetransform method identification information 311 indicating the selectedtransform process is transmitted to the variable length encoding unit 11and then is multiplexed in the bit stream to be output as the videostream 22. After performing an inverse transform process correspondingto that performed in the inverse orthogonal transform unit 13, theinverse transform unit 312 uses the color space transform processdesignated by the color space transform method identificationinformation 311 to implement the inverse color space transform process.

In the decoding device, the variable length decoding unit 25 extractsthe color space transform method identification information 311 from thebit stream to transmit the result of extraction to the inverse transformunit 312, thereby performing the similar process as that in the inversetransform unit 312 in the encoding device described above. With such aconfiguration, when the correlation remaining between the colorcomponents can be sufficiently removed in the prediction differencearea, the removal can be executed as a part of the encoding process toprovide the effect of enhancing the encoding efficiency. However, whendifferent macroblock headers are used for the components C0, C1, and C2,respectively, the correlation is unlikely to be maintained in the areaof the prediction difference signal 4 because the prediction method canprimarily be varied for each component, for example, the intraprediction for the C0 component and the inter prediction for the C1component. Therefore, when different macroblock headers are used for thecomponents C0, C1, and C2, respectively, the transform unit 310 and theinverse transform unit 312 may be operated not to execute the colorspace transform. Alternatively, identification information indicatingwhether or not the color space transform is to be executed in the areaof the prediction difference signal 4 may be multiplexed in the bitstream. The color space transform method identification information 311may be switched in units of any of sequences, pictures, slices, andmacroblocks.

With the configurations of the encoding device illustrated in FIG. 64and the decoding device illustrated in FIG. 65, the transformcoefficient data of each of the components C0, C1, and C2 has adifferent signal definition domain of the signal to be encoded accordingto the color space transform method identification information 311.Therefore, it is believed that the transform coefficient data generallyhas a different occurrence probability distribution according to thecolor space transform method identification information 311. Therefore,when the encoding device and the decoding device are configured asillustrated in FIGS. 64 and 65, respectively, the encoding and thedecoding are performed by using the context model associated with eachoccurrence probability state for each state of the color space transformmethod identification information 311 for each of the components C0, C1,and C2.

It is apparent from the description of the operation of the decodingdevice in the twelfth embodiment of the present invention describedabove that the context model is defined in the same procedure to performthe arithmetic decoding in both the encoding device and the decodingdevice. Moreover, after the determination of the context model to beused while specifying the component whose information is referred to bythe context model, the occurrence probability state associated with thecontext model is updated based on the state of the occurrenceprobability state parameter-sharing identification flag 143.

Fourteenth Embodiment

In the fourteenth embodiment, for the encoding device and the decodingdevice in the embodiments described above, further specific deviceconfigurations will be discussed.

In the above-mentioned embodiments, the operations of the encodingdevice and the decoding device have been described referring to, forexample, FIGS. 1, 2, 30, 31 and the drawings corresponding thereto.Referring to these drawings, the following operation has been described.The input video signal composed of the three color components iscollectively input to the encoding device. The encoding device encodesthe input video signal while selecting the encoding method from themethod for encoding three color components within the encoding devicebased on the common prediction mode or macroblock header and theencoding method based on different prediction modes or macroblockheaders for the three color components. The encoding device inputs theresultant bit stream to the decoding device. The decoding device decodesthe bit stream while determining based on the flag decoded and extractedfrom the bit stream (for example, the intra prediction mode-sharingidentification flag 23, the inter prediction mode-sharing identificationflag 123, or the like) whether the three color components have beendecoded within the decoding device based on the common prediction modeor macroblock header or based on the different prediction modes ormacroblock headers. In this manner, a reproduced video image isobtained. The possibility of encoding and decoding of the flag in unitsof arbitrary data layers such as the macroblocks, the slices, thepictures, and the sequences has already been described. In thefourteenth embodiment of the present invention, in particular, a deviceconfiguration and an operation for encoding and decoding three colorcomponent signals while determining for each frame (or each field)whether the three color component signals are encoded based on a commonmacroblock header or different macroblock headers will be describedbased on specific drawings. Hereinafter, unless otherwise noted, “oneframe” is regarded as one-frame or one-field data unit.

The macroblock header in the fourteenth embodiment of the presentinvention contains macroblock overhead information other than thetransform coefficient data, such as the transformed block sizeidentification flag as illustrated in FIG. 15, the encoding/predictionmode information such as the macroblock type/sub-macroblock type and theintra prediction mode as illustrated in FIG. 50, the motion predictioninformation such as the reference image identification number and themotion vector, the transform coefficient validity identificationinformation, and the quantization parameter for the transformcoefficient.

Hereinafter, a process of encoding three color component signals for oneframe with a common macroblock header is referred to as “common encodingprocess,” whereas a process of encoding three color component signalsfor one frame with different independent macroblock headers is referredto as “independent encoding process.” Similarly, a process of decodingframe image data from the bit stream obtained by encoding three colorcomponent signals for one frame with a common macroblock header isreferred to as “common decoding process,” whereas a process of decodingframe image data from the bit stream obtained by encoding three colorcomponent signals for one frame with different independent macroblockheaders is referred to as “independent decoding process.” In the commonencoding process in the fourteenth embodiment of the present invention,as illustrated in FIG. 66, the input video signal for one frame isdivided into macroblocks, each macroblock being obtained by gatheringthree color components. On the other hand, in the independent encodingprocess, as illustrated in FIG. 67, the input video signal for one frameis first divided into three color components. Each of the three colorcomponents is further divided into macroblocks, each macroblock beingcomposed of a single color component. Specifically, the macroblock to besubjected to the common encoding process includes three color componentsamples of C0, C1, and C2, whereas the macroblock to be subjected to theindependent encoding process includes only any one of samples of the C0,C1, and, C2 components.

FIG. 68 is an explanatory view illustrating a motion predictionreference relationship between pictures in a time direction in theencoding device and the decoding device in the fourteenth embodiment. Inthis example, the unit of data indicated by a thick vertical line is apicture. The relationship between the picture and an access unit isindicated by a dotted circle. In the case of the commonencoding/decoding process, one picture is data representing a videosignal for one frame, which contains three color components. On theother hand, in the case of independent encoding/decoding process, onepicture is a video signal for one frame, which contains any one of thecolor components. The access unit is the minimum unit of data forproviding a time stamp to the video signal for the purpose ofsynchronization with audio or sound information and the like. In thecommon encoding/decoding process, one access unit contains data for onepicture (denoted by 427 a in FIG. 68). On the other hand, in theindependent encoding/decoding process, one access unit contains threepictures (denoted by 427 b in FIG. 68). This is because it is only afterthe pictures of all the three color components sharing the same displaytime are obtained that a reproduced video signal for one frame can beobtained. Each of the numbers above the respective pictures denotes theorder of encoding or decoding of the picture in the time direction(frame_num in the AVC). In FIG. 68, an arrow between the picturesindicates a reference direction in the motion prediction. Specifically,in the independent encoding/decoding process, the motion predictionreference between the pictures contained in the same access unit and themotion prediction reference between different color components are notperformed. The picture of each of the color components C0, C1, and C2 isencoded or decoded while limiting the prediction reference to a signalof the same color component. With such a configuration, in theindependent encoding/decoding process in the fourteenth embodiment ofthe present invention, each of the color components can be encoded ordecoded without depending on the encoding/decoding process of the othercolor components at all, thereby facilitating a parallel process.

In the AVC, an instantaneous decoding device refresh (IDR) picture whichperforms the intra encoding by itself and resets the contents in areference image memory used for the motion compensation prediction isdefined. Since the IDR picture can be decoded without depending on anyother pictures, the IDR picture is used as a random access point. In thecommon encoding process, one access unit is equal to one picture. In theindependent encoding process, however, one access unit is composed of aplurality of pictures. Therefore, when a certain color component pictureis the IDR picture, the other color component pictures are also IDRpictures to define an IDR access unit, to thereby ensure the randomaccess function.

In the fourteenth embodiment below, identification informationindicating whether the encoding has been performed in the commonencoding process or in the independent encoding process is referred toas common encoding/independent encoding identification signal.

FIG. 69 is an explanatory view illustrating an example of the structureof a bit stream, which is generated by the encoding device in thefourteenth embodiment to be input to and decoded by the decoding devicein the fourteenth embodiment. FIG. 69 illustrates a bit stream structurefrom the sequence level to the frame level. First, the commonencoding/individual encoding identification signal 423 is multiplexed ina higher-order header at the sequence level (a sequence parameter set inthe case of the AVC). Each frame is encoded for each access unit. Anaccess unit delimiter NAL unit is a unique NAL unit for identifying theboundary between the access units in the AVC. When the commonencoding/independent encoding identification signal 423 indicates“picture encoding in the common encoding process,” the access unitcontains encoded data for one picture. It is assumed that the picture inthis case is data representing a video signal for one frame, whichcontains three color components, as described above. The encoded data inthe i-th access unit is constituted as a set of slice data, Slice(i, j),where j is an index of slice data in one picture.

On the other hand, when the common encoding/independent encodingidentification signal 423 indicates “picture encoding in the independentencoding process,” one picture is a video signal for one frame, which iscomposed of any one of the color components. In this case, encoded datain the p-th access unit is constituted as a set of slice data, Slice(p,q,r), of the q-th picture in the access unit, where r is an index ofthe slice data in one picture. For the video signal composed of threecolor components as in the case of RGB, the number of possible valuesfor q is three. Moreover, in addition to the video signal composed ofthree primary colors, for example, when additional data such astransmittance information for alpha blending is encoded or decoded asthe same access unit or when a video signal composed of four or morecolor components (for example, YMCK used in color printing) is encodedor decoded, the number of possible values for q is set to four orlarger. If the encoding device and the decoding device in the fourteenthembodiment of the present invention select the independent encodingprocess, each of the color components constituting the video signal iscompletely independently encoded. Therefore, the number of colorcomponents can be freely changed without changing the encoding/decodingprocess in principle. If the signal format for the color representationof a video signal is changed in the future, the independent encodingprocess in the fourteenth embodiment has the effect capable of copingwith such a change.

In order to realize the configuration as described above, in thefourteenth embodiment of the present invention, the commonencoding/independent encoding identification signal 423 is representedin the form of the “number of pictures contained in one access unit,which are independently encoded without mutually referring to the motionprediction.” In this case, the common encoding/independent encodingidentification signal 423 can be represented by the number of possiblevalues for the parameter q. The number of possible values for theparameter q is hereinafter referred to as num_pictures_in_au.Specifically, num_pictures_in_au=1 indicates the “common encodingprocess,” whereas num_pictures_in_au=3 indicates the “independentencoding process” in the fourteenth embodiment of the invention. Whenthe number of color components is equal to or larger than four, thevalue of num_pictures_in_au can be set to satisfy: num_pictures_in_au>3.Owing to such signaling, by simply decoding and referring tonum_pictures_in_au, the decoding device can not only distinguish theencoded data obtained by the common encoding process and that obtainedby the independent encoding process but also simultaneously know thenumber of single color component pictures present in one access unit. Asa result, the compatibility with a future extension of the colorrepresentation of the video signal is ensured. At the same time, thecommon encoding process and the independent encoding process can beseamlessly handled in the bit stream.

FIG. 70 is an explanatory view illustrating a bit stream structure ofthe slice data in each of the common encoding process and theindependent encoding process. In the bit stream encoded by theindependent encoding process, a color component identification flag(color_channel_idc) is provided in a header area in the slice data toenable the identification of the color component picture in the accessunit, to which the slice data received by the decoding device belongs,in order to achieve the effect described below. The slices having thesame value of color_channel_idc are gathered into a group. Specifically,the slices having different values of color_channel_idc are not allowedto have any dependency in encoding/decoding (for example, a motioncompensation reference, context modeling and occurrence probabilitylearning in CABAC, and the like). Such a definition ensures thedependency of each of the pictures in the access unit in the independentencoding process. Moreover, a value of frame_num (the order ofencoding/decoding of the picture containing the slice) multiplexed ineach slice header is the same value for the pictures of all the colorcomponents in one access unit.

FIG. 71 is an explanatory view illustrating a schematic configuration ofthe encoding device in the fourteenth embodiment of the presentinvention. In FIG. 71, the common encoding process is implemented in afirst picture encoding unit 503 a, whereas the independent encodingprocess is implemented in second picture encoding units 503 b 0, 503 b1, and 503 b 2 (each prepared for the three color components). The inputvideo signal 1 is fed by a switch (SW) 501 to any one of the firstpicture encoding unit 503 a, and a color component separating unit 502and the second picture encoding units 503 b 0 to 503 b 2. The switch 501is driven by the common encoding/independent encoding identificationsignal 423 to feed the input video signal 1 to a designated path.Hereinafter, a case is described where the common encoding/independentencoding identification signal (num_pictures_in_au) 423 is multiplexedin a sequence parameter set for the input video signal in the 4:4:4format to be a signal for selecting any of the common encoding processand the independent encoding process for each sequence. This case isconceptually the same as the inter prediction mode-sharingidentification flag 123 described in the seventh embodiment of thepresent invention and the macroblock header-sharing identification flag123 c described in the eleventh embodiment of the present invention. Forthe use of the common encoding process, the decoding device is requiredto execute the common decoding process. On the other hand, for the useof the independent encoding process, the decoding device is required toexecute the independent decoding process. Therefore, the commonencoding/independent encoding identification signal 423 is required tobe multiplexed in the bit stream as information designating the processto be executed. Therefore, the common encoding/independent encodingidentification signal 423 is input to a multiplexing unit 504. The unitof multiplexing of the common encoding/independent encodingidentification signal 423 may be any unit, for example, the unit of agroup of picture (GOP) composed of some picture groups in the sequenceas long as the unit is in the higher-order layer at the level equal toor higher than the picture.

For the implementation of the common encoding process, the first pictureencoding unit 503 a divides the input video signal 1 into macroblocks,each macroblock being obtained by gathering the samples of three colorcomponents as illustrated in FIG. 66, and proceeds with the encodingprocess on the macroblock basis. The encoding process performed in thefirst picture encoding unit 503 a will be described below. For theselection of the independent encoding process, the color componentseparating unit 502 separates the input video signal 1 into data of C0for one frame, data of C1 for one frame, and data of C2 for one frame,which are each fed to the corresponding second picture encoding units503 b 0 to 503 b 2. Each of the second picture encoding units 503 b 0 to503 b 2 divides the signal for one frame, which is obtained byseparating the video signal for the respective color components, intomacroblocks in the form as illustrated in FIG. 67, and proceeds with theencoding process in the units of macroblocks. The encoding process inthe second picture encoding units 503 b 0 to 503 b 2 will be describedbelow.

The video signal composed of three color components for one picture isinput to the first picture encoding unit 503 a which in turn outputs theencoded data as a video stream 422 a. On the other hand, the videosignal composed of a single color component for one picture is input toeach of the second picture encoding units 503 b 0 to 503 b 2. Then, thesecond picture encoding units 503 b O to 503 b 2 output the encoded dataas video streams 422 b 0 to 422 b 2, respectively. The video streams 422b 0 to 422 b 2 are multiplexed in the form of a video stream 422 c inthe multiplexing unit 504 based on the state of the commonencoding/independent encoding identification signal 423. Then, the videostream 422 c is output.

For the multiplexing of the video stream 422 c, in the access unit ofthe case of the independent encoding process, the order of multiplexingand the order of transmission of slice data in the bit stream can beinterleaved between the pictures (color components) in the access unit(FIG. 72). In this case, the decoding device is required to identify thecolor component in the access unit, to which the received slice databelongs. For this purpose, the color component identification flagmultiplexed in the header area of the slice data as in FIG. 70 is used.

With such a configuration, when the encoding device uses the independentthree second picture encoding units 503 b 0 to 503 b 2 to encode thepictures of the three color components in a parallel process as in theencoding device illustrated in FIG. 71, the encoding device can transmitthe encoded data as soon as the slice data of the picture of one of thecolor components is ready for transmission without waiting for thepreparation of the encoded data of the other color component pictures.In the AVC, one picture can be divided into a plurality of slice datafor the encoding. The slice data length or the number of macroblockscontained in the slice can be flexibly varied according to the encodingconditions. In order to ensure the independency of the decoding processof the slice, the neighborhood context such as the intra prediction orthe arithmetic coding cannot be used between the neighboring slices inthe image space. Therefore, as the slice data length increases, thehigher encoding efficiency is obtained. On the other hand, if an erroris mixed into the bit stream during the transmission or the recording, aquicker recovery from the error can be made as the slice data lengthbecomes shorter. As a result, the quality can be more likely to beprevented from being deteriorated. If the length or the structure of aslice, the order of the color components or the like is fixed withoutmultiplexing the color component identification flag, the condition ofgenerating the bit stream is fixed in the encoding device. As a result,the encoding device cannot flexibly cope with various encodingrequirements.

Moreover, the configuration of the bit stream as illustrated in FIG. 72enables the reduction of a transmitted buffer size required for thetransmission in the encoding device, specifically, the reduction of aprocessing delay in the encoding device. FIG. 72 illustrates thereduction of the processing delay. If the multiplexing of the slice dataover the pictures is not allowed, the encoding device is required tobuffer the encoded data of the other pictures until the encoding of thepicture of a certain specific color component is terminated. This meansthe generation of a delay at the picture level. On the other hand, asillustrated in the lowermost part in FIG. 72, if the slice data can beinterleaved at the slice level, the picture encoding unit for onespecific color component can output the encoded data to the multiplexingunit in units of slice data to prevent the delay.

The slice data contained in a single color component picture may betransmitted in the order of raster scan of the macroblocks or may beconfigured to allow an interleaved transmission even in a singlepicture.

Hereinafter, the operations of the first and the second picture encodingunits will be described in detail.

Outline of Operation of the First Picture Encoding Unit

FIG. 73 illustrates an internal configuration of the first pictureencoding unit 503 a. In FIG. 73, the input video signal 1 is in the4:4:4 format and is input on the macroblock basis as illustrated in FIG.66, each macroblock being obtained by gathering three color components.

First, a prediction unit 461 selects a reference image from the motioncompensation prediction reference image data stored in the memories 16 ato perform the motion compensation prediction process on the macroblockbasis described above. The memories 16 a store a plurality of referenceimage data composed of three color components over a plurality of times.The prediction unit 461 selects the optimal reference image from theplurality of reference image data for each macroblock to perform themotion prediction. The reference image data stored in the memories 16 amay be arranged in a frame sequential manner for each color component,or the samples of each of the color components may be stored in a dotsequential manner. Seven block sizes are prepared for the motioncompensation prediction. First, for each macroblock, any one of thesizes 16×16, 16×8, 8×16, and 8×8 can be selected as illustrated in FIGS.32A to 32D. Then, for the selection of the 8×8 size, any one of thesizes 8×8, 8×4, 4×8, and 4×4 can be selected for each 8×8 block, asillustrated in FIGS. 32E and 32H.

The prediction unit 461 executes the motion compensation predictionprocess for all or a part of the block sizes and the sub-block sizes inFIGS. 32A to 32H, the motion vectors in a predetermined search range,and one or more available reference images, for each macroblock. Then,the prediction difference signal 4 is obtained for each block serving asthe unit of motion compensation prediction by the motion vectorinformation and the reference image identification number used for theprediction in the subtracter 3. The prediction efficiency of theprediction difference signal 4 is evaluated in the encoding modedetermining unit 5. Of the prediction processes executed in theprediction unit 461, the prediction unit 461 outputs the macroblocktype/sub-macroblock type 106, the motion vector information/referenceimage identification number with which the optimal prediction efficiencyfor the macroblock to be predicted is obtained. All the macroblockheader information such as the macroblock type, the sub-macroblock type,the reference image index, and the motion vector are determined asheader information common to the three color components to be used forencoding, and is multiplexed in the bit stream. For the evaluation ofthe optimality of the prediction efficiency, a prediction error amountmay be evaluated only for a predetermined color component (for example,the G component of RGB, the component Y of YUV) in order to reduce theamount of calculations. Alternatively, the prediction error amount forall the color components may be comprehensively evaluated to obtain theoptimal prediction performance, but the amount of calculations isincreased in this case. Further, for the ultimate selection of themacroblock type/sub-macroblock type 106, the weighting coefficient 20for each type, which is determined by the encoding control unit 19, issometimes taken into consideration.

Similarly, the prediction unit 461 also implements the intra prediction.In the implementation of the intra prediction, the intra prediction modeinformation is output as an output signal. Hereinafter, when the intraprediction and the motion compensation prediction are not particularlydistinguished from each other, the output signal is referred to asprediction overheard information containing the intra prediction modeinformation, the motion vector information, and the reference imageidentification number. Even for the intra prediction, the predictionerror amount only for a predetermined color component may be evaluated,or the prediction error amount for all the color components may becomprehensively evaluated. Ultimately, the use of the intra predictionor the inter prediction for the macroblock type is determined byevaluating the prediction efficiency or the encoding efficiency in theencoding mode determining unit 5.

Then, the prediction difference signal 4 obtained by the intraprediction or the motion compensation prediction based on the selectedmacroblock type/sub-macroblock type 106 and the prediction overheardinformation 463 is output to the transform unit 310. The transform unit310 transforms the input prediction difference signal 4 into a transformcoefficient to be output to the quantization unit 9. For this process,the size of the block serving as the unit of transform may be selectedfrom 4×4 and 8×8. When the transformation block size is selectable, theblock size selected at the time of encoding is reflected in a value of atransformation block size designating flag 464 to multiplex the flag 464in the bit stream. The quantization unit 9 quantizes the input transformcoefficient based on the quantization parameter 21 determined by theencoding control unit 19 to output the result of quantization as thequantized transform coefficient 10 to the variable length encoding unit11. The quantized transform coefficient 10 contains the information forthe three color components and is entropy-encoded by means such asHuffman encoding or arithmetic coding in the variable length encodingunit 11. The quantized transform coefficient 10 passes through theinverse quantization unit 12 and the inverse transform unit 312 to berestored to the local decoded prediction difference signal 14. The localdecoded prediction difference signal 14 is added to the predicted image7 generated based on the selected macroblock type/sub-macroblock type106 and the prediction overhead information 463 in the adder 18 togenerate the local decoded image 15. After the implementation of a blockdistortion removal process through the deblocking filter 462, the localdecoded image 15 is stored in the memories 16 a to be used for thesubsequent motion compensation prediction process. The deblocking filtercontrol flag 24 indicating whether or not to apply the deblocking filterto the macroblock is also input to the variable length encoding unit 11.

The quantized transform coefficient 10, the macroblocktype/sub-macroblock type 106, the prediction overhead information 463,and the quantization parameter 21, which are input to the variablelength encoding unit 11, are arranged and shaped as a bit streamaccording to a predetermined rule (syntax). Then, the bit stream isoutput as encoded data in the NAL unit for each slice data obtained bygathering one or more macroblock(s) in the form illustrated in FIG. 66to the transmission buffer 17. The transmission buffer 17 smoothes thebit stream according to the band of a transmission path to which theencoding device is connected or the reading velocity of a recordingmedium to output the bit stream as the video stream 422 a. Thetransmission buffer 17 outputs feedback information to the encodingcontrol unit 19 according to the state of accumulation of the bitstreams in the transmission buffer 17 to control the amount of codes tobe generated in the encoding of subsequent video frames.

Since an output from the first picture encoding unit 503 a is in theunit of a slice obtained by gathering three component and is equivalentto the amount of codes in the unit obtained by gathering access units,the transmission buffer 17 may be still located in the multiplexing unit504.

In the first picture encoding unit 503 a in the fourteenth embodiment,since all the slice data in the sequence can be identified as theslices, each slice containing C0, C1, and C2 (specifically, the slicecontaining information for three color components) based on the commonencoding/independent encoding identification signal 423, the colorcomponent identification flag is not multiplexed in the slice header.

Outline of Operation of the Second Picture Encoding Unit

FIG. 74 illustrates an internal configuration of the second pictureencoding unit 503 b 0 (503 b 1 or 503 b 2). In FIG. 74, the input videosignal 1 is input on the macroblock basis, each macroblock beingcomposed of a single color component sample, in the form illustrated inFIG. 67.

First, the prediction unit 461 selects the reference image from themotion compensation reference image data stored in a memory 16 b toperform the motion compensation prediction process on the macroblockbasis. The memory 16 b can store the data of a plurality of referenceimages, each data being composed of a single color component, over aplurality of times. The prediction unit 461 selects the optimalreference image from the reference image data on the macroblock basis toperform the motion compensation. The memory 16 b may be used with thememories 16 a for the unit of three color components. Seven block sizesare prepared for the motion compensation prediction. First, for eachmacroblock, any one of the sizes 16×16, 16×8, 8×16, and 8×8 can beselected as illustrated in FIGS. 32A to 32D. Then, for the selection ofthe 8×8 size, any one of the sizes 8×8, 8×4, 4×8, and 4×4 can beselected for each 8×8 block, as illustrated in FIGS. 32E to 32H.

The prediction unit 461 executes the motion compensation predictionprocess for all or a part of the block sizes and the sub-block sizes inFIGS. 32A to 32H, the motion vectors in a predetermined search range,and one or more available reference images, for each macroblock. Then,the prediction difference signal 4 is obtained for each block serving asthe unit of motion compensation prediction by the motion vectorinformation and the reference image identification number used for theprediction in the subtracter 3. The prediction efficiency of theprediction difference signal 4 is evaluated in the encoding modedetermining unit 5. Of the prediction processes executed in theprediction unit 461, the prediction unit 461 outputs the macroblocktype/sub-macroblock type 106 and the motion vector information/thereference image identification number with which the optimal predictionefficiency for the macroblock to be predicted is obtained. All themacroblock header information such as the macroblock type, thesub-macroblock type, the reference image index, and the motion vectorare determined as header information for a single color component signalof the input video signal 1 to be used for encoding, and is multiplexedin the bit stream. For the evaluation of the optimality of theprediction efficiency, a prediction error amount is evaluated only for asingle color component to be encoded. For the ultimate selection of themacroblock type/sub-macroblock type 106, the weighting coefficient 20for each type, which is determined by the encoding control unit 19, issometimes taken into consideration.

Similarly, the prediction unit 461 also implements the intra prediction.In the implementation of the intra prediction, the intra prediction modeinformation is output as the output signal. Hereinafter, when the intraprediction and the motion compensation prediction are not particularlydistinguished from each other, the output signal is referred to asprediction overheard information containing the intra prediction modeinformation, the motion vector information, and the reference imageidentification number. Even for the intra prediction, the predictionerror amount only for a single color component to be encoded may beevaluated. Ultimately, the use of the intra prediction or the interprediction for the macroblock type is determined based on the evaluationof the prediction efficiency or the encoding efficiency.

Then, the prediction difference signal 4 obtained based on the selectedmacroblock type/sub-macroblock type 106 and the prediction overheardinformation 463 is output to the transform unit 310. The transform unit310 transforms the input prediction difference signal 4 of the singlecolor component into a transform coefficient to be output to thequantization unit 9. For this process, the size of the block serving asthe unit of transform may be selected from 4×4 and 8×8. When thetransformation block size is selectable, the block size selected at thetime of the encoding is reflected in the value of the transformationblock size designating flag 464 to multiplex the flag 464 in the bitstream. The quantization unit 9 quantizes the input transformcoefficient based on the quantization parameter 21 determined by theencoding control unit 19 to output the result of quantization as thequantized transform coefficient 10 to the variable length encoding unit11. The quantized transform coefficient 10 contains the information forthe single color component and is entropy-coded by means such as Huffmanencoding or arithmetic coding in the variable length encoding unit 11.The quantized transform coefficient 10 passes through the inversequantization unit 12 and the inverse transform unit 312 to be restoredto the local decoded prediction difference signal 14. The local decodedprediction difference signal 14 is added to the predicted image 7generated based on the selected macroblock type/sub-macroblock type 106and the prediction overhead information 463 in the adder 18 to generatethe local decoded image 15. After the implementation of the blockdistortion removal process through the deblocking filter 462, the localdecoded image 15 is stored in the memory 16 b to be used for thesubsequent motion compensation prediction process. The deblocking filtercontrol flag 24 indicating whether or not to apply the deblocking filterto the macroblock is also input to the variable length encoding unit 11.

The quantized transform coefficient 10, the macroblocktype/sub-macroblock type 106, the prediction overhead information 463,and the quantization parameter 21, which are input to the variablelength encoding unit 11, are arranged and shaped as a bit streamaccording to a predetermined rule (syntax). Then, the bit stream isoutput as encoded data in the NAL unit for each slice data obtained bygathering one or more macroblock(s) in the form illustrated in FIG. 67to the transmission buffer 17. The transmission buffer 17 smoothes thebit stream according to the band of a transmission path to which theencoding device is connected or the reading velocity of a recordingmedium to output the bit stream as the video stream 422 b 0 (422 b 1 or422 b 2). The transmission buffer 17 outputs feedback information to theencoding control unit 19 according to the state of accumulation of thebit streams in the transmission buffer 17 to control the amount of codesto be generated in the encoding of subsequent video frames.

An output from each of the second picture encoding units 503 b 0 to 503b 2 is the slice composed of the data for a single color component. Whenthe amount of codes is required to be controlled in the unit of a set ofaccess units, a common transmission buffer, for the unit obtained bymultiplexing the slices of all the color components, may be provided inthe multiplexing unit 504 to output feedback information to the encodingcontrol unit 19 for each of the color components based on the amount ofoccupancy in the common transmission buffer. Moreover, in this case, theencoding control may be performed by using only the amount of generatedinformation for all the color components or may be performed inconsideration of the state of the transmission buffer 17 of each of thecolor components. When the encoding control is performed by using onlythe amount of generated information for all the color components, thefunction equivalent to that of the transmission buffer 17 may berealized by the common transmission buffer in the multiplexing unit 504to omit the transmission buffer 17.

Since the second picture encoding units 503 b 0 to 503 b 2 in thefourteenth embodiment of the present invention can identify, based onthe common encoding/independent encoding identification signal 423, thatall the slice data in the sequence are single color component slices(specifically, the slice C0, the slice C1, or the slice C2), the colorcomponent identification flag is always multiplexed in the slice headerto allow the decoding device to identify the correspondence relationbetween the slice and the picture data in the access unit. Therefore,each of the second picture encoding units 503 b 0 to 503 b 2 cantransmit data as soon as the data for one slice is obtained withoutwaiting for the accumulation of outputs for one picture from its owntransmission buffer 17.

The common encoding/independent encoding identification signal(num_pictures_in_au) is enabled to simultaneously represent theinformation (common encoding identification information) fordistinguishing the data encoded by the common encoding process and thedata encoded by the independent encoding process and the informationindicating how many single color component pictures are present (numberof color components) in one access unit. However, each of theabove-mentioned two information may be encoded as independentinformation.

The first picture encoding unit 503 a and the second picture encodingunits 503 b 0 to 503 b 2 differ from each other only in the handling ofthe macroblock header and in the bit stream structure of the slice data.The handling of the macroblock header herein means whether themacroblock header information is handled as the information common tothe three components or the information of a single color component.Many of the basic processing blocks in FIG. 73 or 74, such as theprediction unit, the transform unit/the inverse transform unit, thequantization unit/the inverse quantization unit, and the deblockingfilter, can be realized by functional blocks common to the first pictureencoding unit 503 a and the second picture encoding units 503 b 0 to 503b 2 with only a difference in the handling of the information,specifically, whether the information is handled as information for thethree color components or information for a single color component.Therefore, the first picture encoding unit 503 a and the second pictureencoding units 503 b 0 to 503 b 2 can be realized not only as thecompletely independent encoding processing units as in FIG. 71. Anarbitrary combination of the basic components as illustrated in FIG. 73or 74 can also realize the mounting of various encoding devices.Moreover, by providing the memories 16 a in a frame sequential manner inthe first picture encoding unit 503 a, the common configuration of thereference image storage memory can be used for the first pictureencoding unit 503 a and the second picture encoding units 503 b O to 503b 2.

The presence of a virtual stream buffer (encoded picture buffer) forbuffering the video stream 422 c according to the sequence illustratedin FIGS. 69 and 70 and a virtual frame memory (decoded picture butter)for buffering the decoded images 427 a and 427 b, which is notillustrated, is supposed in the encoding device in the fourteenthembodiment of the present invention. In this case, the video stream 422c is generated so as not to cause the overflow or underflow of theencoded picture buffer or the collapse of the decoded picture buffer.The control is mainly performed in the encoding control unit 19. Thecontrol ensures that the decoding device does not collapse when thevideo stream 422 c is decoded according to the operations of the encodedpicture buffer and the decoded picture buffer (virtual buffer model) inthe decoding device. The virtual buffer model is defined as follows.

The encoded picture buffer is operated for each access unit. Asdescribed above, for the common decoding process, one access unitcontains the encoded data for one picture. On the other hand, for theindependent decoding process, one access unit contains the encoded datafor the number of pictures equal to that of the color components (forthree pictures if three color components are used). The operationdefined for the encoded picture buffer is performed at the times whenthe first bit and the last bit in the access unit are input to theencoded picture buffer and when the bits in the access unit are readfrom the encoded picture buffer. The reading from the encoded picturebuffer is defined as being done immediately. It is assumed that all thebits in the access unit are read from the encoded picture buffer at thesame time. After being read from the encoded picture buffer, the bits inthe access unit are input to a higher-order header analyzing unit andthen are decoded in the first picture decoding unit or the secondpicture decoding unit as described above to be output as a color videoframe bundled into the access unit. The process from the reading of thebits from the encoded picture buffer to the output of the color videoframe in the access unit is immediately executed according to thedefinition of the virtual buffer model. The color video frame configuredfor each access unit is input to the decoded picture buffer to calculatean output time from the decoded picture buffer. The output time from thedecoded picture buffer is obtained by adding a predetermined delay timeto the reading time from the encoded picture buffer. The delay time canbe multiplexed in the bit stream to control the decoding device. Whenthe delay time is 0, specifically, the output time from the decodedpicture buffer is the same as the reading time from the encoded picturebuffer, the color video frame is output from the decoded picture buffersimultaneously with the input of the color video frame to the decodedpicture buffer. Otherwise, specifically, when the output time from thedecoded picture buffer is later than the reading time from the encodedpicture buffer, the color video frame is stored in the decoded picturebuffer until the output time from the decoded picture buffer. Asdescribed above, the operation of the decoded picture buffer is definedfor each access unit.

FIG. 75 is an explanatory view illustrating a schematic configuration ofthe decoding device in the fourteenth embodiment of the presentinvention. In FIG. 75, the common decoding process is executed in afirst picture decoding unit 603 a, whereas the independent decodingprocess is executed in a color component determining unit 602 and secondpicture decoding units 603 b 0, 603 b 1, and 603 b 2 (each prepared forthree color components).

The video stream 422 c is divided into NAL units in a higher-orderheader analyzing unit 610. Higher-order header information such as asequence parameter set or a picture parameter set is decoded to bestored in a predetermined memory area in the decoding device, which canbe referred to by the first picture decoding unit 603 a, the colorcomponent determining unit 602, and the second picture decoding units603 b 0 to 603 b 2. The common encoding/independent encodingidentification signal 423 (num_pictures_in_au) multiplexed for eachsequence is decoded and retained as a part of the higher-order headerinformation.

The decoded num_pictures_in_au is fed to a switch (SW) 601. Fornum_pictures_in_au=1, the switch 601 feeds the slice NAL unit for eachpicture to the first picture decoding unit 603 a. Fornum_pictures_in_au=3, the switch 601 feeds the slice NAL unit for eachpicture to the color component determining unit 602. Specifically, fornum_pictures_in_au=1, the first picture decoding unit 603 a performs thecommon decoding process. For num_pictures_in_au=3, each of the threesecond picture decoding units 603 b 0 to 603 b 2 performs theindependent decoding process. The detailed operations of the firstpicture decoding unit 603 a and the second picture decoding units 603 b0 to 603 b 2 will be described below.

The color component determining unit 602 identifies the color componentpicture in the current access unit to which the slice NAL unitcorresponds, based on the value of the color component identificationflag illustrated in FIG. 70, to feed the slice NAL unit to a suitableone of the second picture decoding units 603 b 0 to 603 b 2. With such aconfiguration of the decoding device, even when the bit stream encodedwith the slices being interleaved in the access unit as illustrated inFIG. 72 is received, the effect of easily determining the colorcomponent picture, to which the slice of interest belongs, to allowcorrect decoding is obtained.

Outline of Operation of the First Picture Decoding Unit

FIG. 76 illustrates an internal configuration of the first picturedecoding unit 603 a. After dividing the video stream 442 c according tothe sequence illustrated in FIG. 69 or 70, which is output from theencoding device illustrated in FIG. 71, into NAL units in thehigher-order header analyzing unit 610, the first picture decoding unit603 a receives the NAL units in units of slices, each slice containingC0, C1, and C2. The decoding process is performed on the macroblockbasis, each macroblock being composed of three color components,illustrated in FIG. 66, to restore the output video frame.

The variable length decoding unit 25 receives as an input the videostream 442 c divided into the NAL units and deciphers the video stream442 c according to a predetermined rule (syntax) to extract thequantized transform coefficient 10 for three color components, and themacroblock header information (the macroblock type/sub-macroblock type106, the prediction overhead information 463, the transformation blocksize designating flag 464, and the quantized parameter 21) used commonlyto the three color components. The quantized transform coefficient 10 isinput together with the quantization parameter 21 to the inversequantization unit 12 which performs the same process as that performedin the first picture encoding unit 503 a to perform the inversequantization process. Subsequently, the output from the inversequantization unit 12 is input to the inverse transform unit 312 whichperforms the same process as that in the first picture encoding unit 503a to be restored to the local decoded prediction difference signal 14(if the transformation block size designating flag 464 is present in thevideo stream 422 c, the transformation block size designating flag 464is referred to in the inverse quantization and the inverse transformprocesses). On the other hand, of the processes performed in theprediction unit 461 in the first picture encoding unit 503 a, theprediction unit 461 includes only the process of referring to theprediction overhead information 463 to generate the predicted image 7.The macroblock type/sub-macroblock type 106 and the prediction overheardinformation 463 are input to the prediction unit 461 to obtain thepredicted images 7 for three components. When the macroblock typeindicates the intra prediction, the predicted images 7 for three colorcomponents are obtained according to the intra prediction modeinformation from the prediction overhead information 463. On the otherhand, when the macroblock type indicates the inter prediction, thepredicted images 7 for three components are obtained according to themotion vector and the reference image index from the prediction overheadinformation 463. The local decoded prediction difference signal 14 andthe predicted images 7 are added in the adder 18 to obtain the temporarydecoded images (local decoded images) 15 for three components. Since thetemporary decoded images 15 are used for the motion compensationprediction of the subsequent macroblocks, the block distortion removalprocess is performed on the temporary decoded image samples for threecomponents through the deblocking filter 462 which performs the sameprocess as that performed in the first picture encoding unit 503 a.Thereafter, the temporary decoded image samples are output as a decodedimage 427 a to be stored in the memories 16 a. At this time, thedeblocking filter process is acted on the temporary decoded images 15based on the indication of the deblocking filter control flag 24deciphered by the variable length decoding unit 25. The memories 16 astore the data for a plurality of reference images, which is composed ofthree color components, over a plurality of times. The prediction unit461 selects the reference image indicated by the reference image indexextracted from the bit stream for each macroblock from the plurality ofreference images to generate the predicted image. The reference imagedata may be stored in a frame sequential manner for each color componentin the memories 16 a. Alternatively, as the reference image, the samplesof the respective color components may be stored in a dot sequentialmanner in the memories 16 a. The decoded image 427 a contains threecolor components, and serves as a color video frame constituting theaccess unit 427 a 0 in the common decoding process.

Outline of Operation of the Second Picture Decoding Units

FIG. 77 illustrates an internal configuration of each of the secondpicture decoding units 603 b 0 to 603 b 2. The video stream 442 caccording to the sequence illustrated in FIG. 69 or 70, which is outputfrom the encoding device illustrated in FIG. 71, is divided into NALunits in the higher-order header analyzing unit 610 and then classifiedinto slice NAL units of C0, C1 , and C2 in the color componentdetermining unit 602. Each of the second picture decoding units 603 b 0to 603 b 2 receives each slice NAL unit of C0, C1, or C2 and thenperforms the decoding process on the macroblock basis, each macroblockbeing composed of a single color component sample illustrated in FIG.67, to restore the output video image frame.

The variable length decoding unit 25 receives the video stream 442 c asan input and deciphers the video stream 442 c according to apredetermined rule (syntax) to extract the quantized transformcoefficient 10 for a single color component, and the macroblock headerinformation (the macroblock type/sub-macroblock type 106, the predictionoverhead information 463, the transformation block size designating flag464, and the quantized parameter 21) used for the single colorcomponent. The quantized transform coefficient 10 is input together withthe quantization parameter 21 to the inverse quantization unit 12 whichperforms the same process as that performed in the second pictureencoding unit 503 b 0 (503 b 1 or 503 b 2) to implement the inversequantization process. Subsequently, the output from the inversequantization unit 12 is input to the inverse transform unit 312 whichperforms the same process as that in the second picture encoding unit503 b 0 (503 b 1 or 503 b 2) to be restored to the local decodedprediction difference signal 14 (if the transformation block sizedesignating flag 464 is present in the video stream 422 c, thetransformation block size designating flag 464 is referred to in theinverse quantization and the inverse orthogonal transform processes). Onthe other hand, of the processes performed in the prediction unit 461 inthe second picture encoding unit 503 b 0 (503 b 1 or 503 b 2), theprediction unit 461 includes only the process of referring to theprediction overhead information 463 to generate the predicted image 7.The macroblock type/sub-macroblock type 106 and the prediction overheardinformation 463 are input to the prediction unit 461 to obtain thepredicted image 7 for a single color component. When the macroblock typeindicates the intra prediction, the predicted image 7 for a single colorcomponent is obtained according to the intra prediction mode informationfrom the prediction overhead information 463. On the other hand, whenthe macroblock type indicates the inter prediction, the predicted image7 for a single color component is obtained according to the motionvector and the reference image index from the prediction overheadinformation 463. The local decoded prediction difference signal 14 andthe predicted image 7 are added in the adder 18 to obtain the temporarydecoded image (local decoded image) 15 for a single color component.Since the temporary decoded image 15 is used for the motion compensationprediction of the subsequent macroblocks, the block distortion removalprocess is performed on the temporary decoded image sample for a singlecolor component through the deblocking filter 26 which performs the sameprocess as that in the second picture encoding unit 5030 b (503 b 1 or503 b 2). Thereafter, the temporary decoded image sample is output as adecoded image 427 b to be stored in the memory 16 b. At this time, thedeblocking filter process is acted on the temporary decoded image 15based on the indication of the deblocking filter control flag 24deciphered by the variable length decoding unit 25. The decoded image427 b contains only the sample of a single color component. The decodedimages 427 b output from each of the second picture encoding units 603 b0 to 603 b 2, which are processed in parallel in FIG. 75, are bundledinto an access unit 427 b 0 to be constituted as a color video frame.

As is apparent from the above description, the first picture decodingunit 603 a and the second picture decoding units 603 b 0 to 603 b 2differ from each other only in the handling of the macroblock headerinformation and in the bit stream structure of the slice data. Thehandling of the macroblock header information means whether themacroblock header information is handled as the information common tothe three components or as the information of a single color component.Many of the basic decoding blocks in FIG. 73 or 74, such as the motioncompensation prediction process, the inverse transform, and the inversequantization, can be realized by functional blocks common to the firstpicture decoding unit 603 a and the second picture decoding units 603 b0 to 603 b 2. Therefore, the first picture decoding unit 603 a and thesecond picture decoding units 603 b 0 to 603 b 2 are realized not onlyas the completely independent decoding processing units as in FIG. 75.An appropriate combination of the basic components as illustrated inFIG. 76 or 77 can realize the mounting of various decoding devices.Moreover, by providing the memories 16 a in a frame sequential manner inthe first picture decoding unit 603 a, the common configuration of thememories 16 a and the memory 16 b can be used for the first picturedecoding unit 603 a and the second picture decoding units 603 b 0 to 603b 2.

As a variation of the encoding device illustrated in FIG. 71, thedecoding device in FIG. 75 can constantly fix the commonencoding/independent encoding identification signal 423 to the“independent encoding process” to receive and decode the bit streamoutput from the encoding device configured to independently encode allthe frames without using the first picture encoding unit 503 a at all.As a variation of the decoding device illustrated in FIG. 75, in the usepremised on that the common encoding/independent encoding identificationsignal 423 is constantly fixed to the “independent encoding process,”the decoding device may be configured to perform the independentdecoding process alone with the omission of the switch 601 and the firstpicture decoding unit 603 a.

The common encoding/independent decoding identification signal(num_pictures_in_au) is made to contain the information (common encodingidentification information) for distinguishing the data encoded in thecommon encoding process and the data encoded in the independent encodingprocess from each other and the information indicating how many singlecolor component pictures (number of color components) are present in oneaccess unit. However, each of the two information described above may beencoded as independent information.

Further, the first picture encoding unit 603 a may be provided with afunction of decoding the bit stream compliant with the AVC high-profile,which is obtained by encoding a signal in a conventional YUV 4:2:0format for three components at a time. In the higher-order headeranalyzing unit 610, the format in which the bit stream is encoded isdetermined by referring to the profile identifier decoded from the videostream 422 c. Then, the result of determination is transmitted as a partof information of a signal line of the common encoding/independentencoding identification signal 423 to the switch 601 and the firstpicture decoding unit 603 a. With such a configuration of thehigher-order header analyzing unit 610, the decoding device whichensures the compatibility with the bit stream in the conventional YUV4:2:0 format can be configured.

In the first picture encoding unit 503 a in the fourteenth embodiment ofthe present invention, the information for three color components arepresent in the slice data. Besides, exactly the same intra/interprediction process is implemented for the three color components.Therefore, the signal correlation between the color components sometimesremains in a prediction error signal space. In order to remove thesignal correlation, for example, the color space transform process asdescribed above in the thirteenth embodiment of the present inventionmay be performed on the prediction error signal. FIGS. 78 and 79illustrate examples of the first picture encoding unit 503 a having theconfiguration as described above. FIG. 78 illustrates an example wherethe color space transform process is implemented at the pixel levelprior to the transform process. In this example, the color spacetransform unit 465 is provided before the transform unit 310, whereasthe inverse color space transform unit 466 is provided after the inversetransform unit 312. FIG. 79 illustrates an example where the color spacetransform process is implemented while a frequency component to besubjected to the color space transform process is being appropriatelyselected for the coefficient data obtained after the implementation ofthe transform process. In this example, the color space transform unit465 is provided after the transform unit 310, whereas the inverse colorspace transform unit 466 is provided before the inverse transform unit312. By limiting the frequency component to be subjected to the colorspace transform, the effect of preventing a harmonic noise componentcontained in a specific color component from propagating to anothercolor component which scarcely contains noise can be obtained. When thefrequency component to be subjected to the color space transform processcan be adaptively selected, signaling information 467 for allowing thedecoding device to determine the selection in encoding is multiplexed inthe bit stream.

As the color space transform process, a plurality of transform methodsas described in the thirteenth embodiment of the present inventiondescribed above may be switched for each macroblock according to theproperty of the image signal to be encoded. Alternatively, whether ornot to perform the transform may be determined for each macroblock.Further alternatively, the types of selectable transform methods may bedesignated at the sequence level or the like. In this case, theselection of the transform method may be made for each picture, slice,or macroblock. Further alternatively, whether the color space transformprocess is performed prior to or after the orthogonal transform may beselectable. For the implementation of the adaptive encoding processes,the encoding efficiencies of all the selectable options can be evaluatedin the encoding mode determining unit 5 to select the adaptive encodingprocess having the highest encoding efficiency. Moreover, for theimplementation of the adaptive encoding processes, the signalinginformation 467 to allow the decoding device to determine the selectionin encoding is multiplexed in the bit stream. Such signaling may bedesignated at a level of the slice, the picture, the GOP, or thesequence different from that of the macroblock.

The decoding devices corresponding to the encoding devices illustratedin FIGS. 78 and 79 are illustrated in FIGS. 80 and 81. FIG. 80illustrates a decoding device for decoding the bit stream which isencoded by the color space transform prior to the transform process bythe encoding device of FIG. 78. The variable length decoding unit 25decodes, from the bit stream, the signaling information 467 such as theinformation for selecting whether or not to perform the transform in theinverse color space transform unit 466 or the information for theselection of an executable transform method in the inverse color spacetransform unit 466 to feed the decoded information to the inverse colorspace transform unit 466. The decoding device in FIG. 80 implements thecolor space transform process on the inversely-transformed predictionerror signal based on the above-mentioned information in the inversecolor space transform unit 466. FIG. 81 illustrates the decoding devicefor decoding the bit stream encoded by the color space transform whileselecting the frequency component to be subjected to the color spacetransform after the transform process by the encoding device illustratedin FIG. 79. The variable length decoding unit decodes, from the bitstream, the signaling information 467 which is identificationinformation containing the information for selecting whether or not toimplement the transform in the inverse color space transform unit 466,the information for the selection of an executable transform method inthe inverse color space transform unit, and the information forspecifying a frequency component to be subjected to the color spacetransform to feed the decoded information to the inverse color spacetransform unit 466. The decoding device illustrated in FIG. 81implements the color space transform process on the inversely-quantizedtransform coefficient data based on the decoded information in theinverse color space transform unit 466.

As in the decoding device illustrated in FIG. 75, the first picturedecoding unit 603 a in each of the decoding devices in FIGS. 80 and 81is provided with the function of decoding the bit stream compliant withthe AVC high profile obtained by collectively encoding a video signal inthe conventional YUV 4:2:0 format for the three components. Thehigher-order header analyzing unit 610 refers to the profile identifierdecoded from the video stream 422 c to determine the format in which thebit stream is encoded. Then, the result of determination is transmittedas a part of the information of the signal line of the commonencoding/independent encoding identification signal 423 to the switch601 and the first picture encoding unit 603 a. With such aconfiguration, the decoding device for ensuring the compatibility withthe bit stream in the conventional YUV 4:2:0 format can be configured.

FIG. 82 illustrates a structure of encoded data of macroblock headerinformation contained in the bit stream in the conventional YUV 4:2:0format. The macroblock header information illustrated in FIG. 82 differsfrom the Cn component header information illustrated in FIG. 50 only inthat encoded data of an intra chrominance prediction mode 144 iscontained when the macroblock type is the intra prediction. When themacroblock type is the inter prediction, the structure of the encodeddata of the macroblock header information is the same as that of the Cncomponent header information illustrated in FIG. 50. However, a motionvector of the chrominance component is generated by a method differentfrom that for the luminance component, using the reference imageidentification number and the motion vector information contained in themacroblock header information.

An operation of the decoding device for ensuring the compatibility withthe bit stream in the conventional YUV 4:2:0 format will be described.As described above, it is assumed that the first picture decoding unit603 a has the function of decoding the bit stream in the conventionalYUV 4:2:0 format. An internal configuration of the first picturedecoding unit 603 a is the same as that illustrated in FIG. 76.

An operation of the variable length decoding unit 25 of the firstpicture decoding unit having the function of decoding the bit stream inthe conventional YUV 4:2:0 format will be described. Upon input of thevideo stream 422 c to the variable length decoding unit, the variablelength decoding unit decodes a chrominance format indication flag. Thechrominance format indication flag is contained in a sequence parameterheader of the video stream 422 c, and indicates the input video imageformat. In this case, the input video image format is any one of the4:4:4 format, the 4:2:2 format, the 4:2:0 format, and the 4:0:0 format.The decoding process of the macroblock header information of the videostream 422 c is switched depending on a value of the chrominance formatindication flag. When the macroblock type indicates the intra predictionand the chrominance format indication flag indicates the 4:2:0 format orthe 4:2:2: format, the variable length decoding unit 25 decodes theintra chrominance prediction mode 144 from the bit stream. When thechrominance format indication flag indicates the 4:4:4 format, thevariable length decoding unit 25 skips the decoding of the intrachrominance prediction mode 144. When the chrominance format indicationflag indicates the 4:0:0 format, the variable length decoding unit 25skips the decoding of the intra chrominance prediction mode 144 becausethe input video signal in the format (4:0:0) means that the input videosignal is composed of a luminance signal alone. The process of decodingthe macroblock header information other than the intra chrominanceprediction mode 144 is the same as that of the variable length decodingunit in the first picture decoding unit 603 a which is not provided withthe function of decoding the bit stream in the conventional YUV 4:2:0format. Upon input of the video stream 422 c to the variable lengthdecoding unit 25 by the above process, the chrominance format indicationflag (not shown), and the quantized transform coefficients 10 and themacroblock header information (the macroblock type/sub-macroblock type106, the prediction overhead information 463, the transformation blocksize designating flag 464, and the quantization parameter 21) for thethree color components are extracted. The chrominance format indicationflag (not shown) and the prediction overhead information 463 are inputto the prediction unit 461 to obtain the predicted images 7 for thethree components.

FIG. 83 illustrates an internal configuration of the prediction unit 461in the first picture encoding unit which ensures the compatibility withthe bit stream in the conventional YUV 4:2:0 format, and its operationwill be described below.

A switching unit 4611 a determines the macroblock type. When themacroblock type indicates the intra prediction, a switching unit 4611 bdetermines a value of the chrominance format indication flag. When thevalue of the chrominance format indication flag indicates any one of the4:2:0 format and the 4:2:2 format, the predicted images 7 for the threecomponents are obtained according to the intra prediction modeinformation and the intra chrominance prediction mode information fromthe prediction overhead information 463. Among the predicted images 7for three components, the predicted image of the luminance signal isgenerated in a luminance signal intra prediction unit 4612 according tothe intra prediction mode information. The predicted images of the twochrominance signals are generated in a chrominance signal intraprediction unit 4613 which performs a process different from that forthe luminance component according to the intra chrominance predictionmode information. When the value of the chrominance format indicationflag indicates the 4:4:4 format, the predicted images for all the threecomponents are generated in the luminance signal intra prediction unit4612 according to the intra prediction mode information. When the valueof the chrominance format indication flag indicates the 4:0:0 format,only the predicted image of the luminance signal is generated in theluminance signal intra prediction unit 4612 according to the intraprediction mode information because the signal in the 4:0:0 format iscomposed of the luminance signal (one component) alone.

When the macroblock type indicates the inter prediction in the switchingunit 4611 a, a switching unit 4611 c determines a value of thechrominance format indication flag. When the value of the chrominanceformat indication flag indicates any one of the 4:2:0 format and the4:2:2 format, the predicted image is generated in a luminance signalinter prediction unit 4614 for the luminance signal by the predictedimage generating method of the luminance signal defined in the AVCstandard according to the motion vector and the reference image indexfrom the prediction overhead information 463. For each of the predictedimages of the two chrominance signals, a chrominance motion vector isgenerated in the chrominance signal inter prediction unit 4615 byscaling the motion vector obtained from the prediction overheadinformation 463 based on a chrominance format. The predicted image isgenerated from a reference image indicated by the reference image indexobtained from the prediction overhead information 463 based on thechrominance motion vector according to the method defined in the AVCstandard. When the value of the chrominance format indication flagindicates the 4:0:0 format, only the predicted image of the luminancesignal is generated in the luminance signal inter prediction unit 4614according to the motion vector and the reference image index because the4:0:0 format indicates that the signal is composed of the luminancesignal (one component) alone.

As described above, the means of generating the predicted images of thechrominance signals in the conventional YUV 4:2:0 format is provided toswitch the means used for generating the predicted images for the threecomponents according to the value of the chrominance format indicationflag decoded from the bit stream. Therefore, the decoding device whichensures the compatibility with the bit stream in the conventional YUV4:2:0 format can be configured.

If information indicating whether or not it is a bit stream decodableeven by the decoding device which does not support the color spacetransform process as in the case of the decoding device illustrated inFIG. 75 is provided for the video stream 422 c fed to the decodingdevices in FIGS. 80 and 81 for each sequence parameter set or the like,the bit stream can be decoded in any one of the decoding devicesillustrated in FIGS. 80, 81, and 75 according to its own decodingperformance. As a result, the effect of easily ensuring thecompatibility with the bit stream can be produced.

Fifteenth Embodiment

The fifteenth embodiment of the present invention describes anotherembodiment of the encoding device and the decoding device in thefourteenth embodiment of the invention, as illustrated in FIGS. 71 and75. This fifteenth embodiment differs from the fourteenth embodiment ofthe invention only in the structure of the bit stream to be input to andoutput from the encoding device and the decoding device. An encodingdevice in this fifteenth embodiment multiplexes the encoded data in abit stream structure illustrated in FIG. 84.

In the bit stream having the structure illustrated in FIG. 69, the AUDNAL unit contains information, primary_pic_type, as an element. FIG. 85illustrates information of a picture encoding type when the picture datain the access unit beginning with the AUD NAL unit is encoded.

For example, primary_pic_type=0 indicates that all the slices in thepicture are intra encoded. For primary_pic_type=1, the picture cancontain a slice to be intra encoded and a slice which can be subjectedto the motion compensation prediction by using only one referencepicture list. Since primary_pic_type is information for defining theencoding mode which can encode one picture, the encoding device operatesthe information primary_pic_type to enable the encoding suitable forvarious conditions such as the property of the input video signal andthe random access function. Since only one primary_pic_type is providedfor each access unit in the above-mentioned fourteenth embodiment of theinvention, primary_pic_type is common to three color component picturesin the access unit when the independent encoding process is performed.In this fifteenth embodiment, for the independent encoding of each ofthe color component pictures, primary_pic_type for the remaining twocolor component pictures are additionally inserted into the AUD NAL unitillustrated in FIG. 69, according to the value of num_pictures_in_au.Alternatively, as in the case of the bit stream structure illustrated inFIG. 84, the encoded data of each of the color component pictures isconfigured to begin with a NAL unit (Color Channel Delimiter) indicatingthe beginning of the color component picture, and the CCD NAL unit isconfigured to contain the primary_pic_type information of thecorresponding picture. Since the encoded data of the respective colorcomponent pictures are collectively multiplexed for one picture in thisstructure, the color component identification flag (color_channel_idc)described in the fourteenth embodiment of the invention is contained notin the slice header but in the CCD NAL unit. As a result, theinformation of the color component identification flag, which isrequired to be multiplexed for each slice, can be concentrated in thedata for each picture. Therefore, the effect of reducing the overheadinformation is obtained. Moreover, it is sufficient to detect the CCDNAL unit constituted as a byte sequence to verify color_channel_idc onlyonce for one color component picture. Therefore, since the head of thecolor component picture can be quickly found without performing thevariable length decoding process, the decoding device is no longerrequired to verify color_channel_idc in each slice header to separatethe NAL unit to be decoded for each component. As a result, the data canbe smoothly fed to the second picture decoding unit.

On the other hand, with such a configuration, the effect of reducing thebuffer size and the processing delay of the encoding device as describedin the fourteenth embodiment of the present invention referring to FIG.72 is reduced. Therefore, signaling may be performed at a higher-orderlevel (the sequence or the GOP) to indicate that the color componentidentification flag is multiplexed for each slice or each colorcomponent picture. In such a bit stream structure, the encoding devicecan be flexibly mounted according to its mode of use.

As a further embodiment, the encoded data may be multiplexed in the bitstream structure illustrated in FIG. 86. In FIG. 86, color_channel_idcand primary_pic_type, which are contained in the CCD NAL unit in thecase of FIG. 84, are contained in each AUD. In the bit stream structurein this fifteenth embodiment, one (color component) picture is containedin one access unit even in the case of the independent encoding process.Even in such a structure, the effect of reducing the overheadinformation by concentrating the information of the color componentidentification flag into the data for each picture is obtained.Moreover, it is sufficient to detect the AUD NAL unit constituted as thebyte sequence to perform only one verification of color_channel_idc foreach picture. The head of the color component picture can be quicklyfound without performing the variable length decoding process.Therefore, the decoding device is no longer required to verifycolor_channel_idc in each slice header to separate the NAL unit to bedecoded for each component. As a result, the data can be smoothly fed tothe second picture decoding unit. On the other hand, since one-frame orone-field image is composed of three access units, it is necessary todesignate that the three access units are image data sharing the sametime. Therefore, in the bit stream structure illustrated in FIG. 86, AUDmay further contain a sequence number of each picture (the order ofencoding/decoding in the time direction). With such a structure, thedecoding device can verify the order of decoding and display of eachpicture, a color component attribute, the possibility of IDR, and thelike without decoding the slice data at all, thereby effectivelyperforming edit and special reproduction at the bit stream level.

Moreover, in the bit stream structure in FIGS. 69, 84, or 86,information designating the number of the slice NAL units to becontained in one color component picture may be stored in the AUD or CCDarea.

For all the embodiments described above, each of the transform processand the inverse transform process may be a transform which ensuresorthogonality such as a DCT or may be a transform, which is not anorthogonal transform as in the case of the DCT in a strict sense, to becombined with the quantization or inverse quantization process toapproximate the orthogonality, as in the case of the AVC. Alternatively,the prediction error signal may be encoded as the information at thepixel level without performing the transform.

Sixteenth Embodiment

This sixteenth embodiment describes an encoding device which uses anintra-frame or inter-frame adaptive prediction to perform the encodingin units of rectangular areas obtained by dividing a video frame inputin the 4:4:4 format independently for each color component, eachrectangular area being composed of M_(i)×M_(i) pixels (i=0, 1, or 2),and a corresponding decoding device. Herein, M_(i) indicates the size ofan area obtained by dividing a signal of the i-th color component in thevideo frame.

1. Outline of Operation of the Encoding Device

FIG. 87 illustrates a configuration of the video encoding device in thesixteenth embodiment of the present invention. The input video signal 1in the 4:4:4 format is separated into screen components of therespective color components 505 b 0, 505 b 1, and 505 b 2 in the colorcomponent separating unit 502, which are then input to the secondpicture encoding units 503 b 0, 503 b 1, and 503 b 2, each having thesame configuration. At this time, from the color component separatingunit 502, information 506 b 0, 506 b 1, and 506 b 2 designating the sizeM_(i) of the rectangular area corresponding to the unit of encoding inthe respective picture encoding units 503 b 0, 503 b 1, and 503 b 2 areeach input to the corresponding picture encoding units 503 b 0, 503 b 1,and 503 b 2. As a result, the picture encoding units 503 b 0, 503 b 1,and 503 b 2 for encoding the color component Ci divide the correspondingscreen components 505 b 0, 505 b 1, and 505 b 2 based on the rectangulararea size M_(i) to perform the encoding in units of the rectangularareas.

Hereinafter, an operation of each of the picture encoding units 503 b 0,503 b 1, and 503 b 2 will be described in detail. The picture encodingunits 503 b 0, 503 b 1, and 503 b 2 will be described in the sixteenthembodiment of the present invention as a variation of the configurationillustrated in FIG. 74. FIG. 88 illustrates an internal configuration ofeach of the picture encoding units 503 b 0, 503 b 1, and 503 b 2. InFIG. 88, the functional blocks and the signal lines denoted by the samereference numerals as those of the picture encoding unit illustrated inFIG. 74 are the same as those in FIG. 74 unless otherwise noted. For thefollowing description of the picture encoding units 503 b 0, 503 b 1,and 503 b 2, the screen components 505 b 0, 505 b 1, and 505 b 2 of therespective color components are representatively denoted by an inputsignal 505. In the same manner, the information 506 b 0, 506 b 1, and506 b 2 designating the size M_(i) of the rectangular area correspondingto the unit of encoding are representatively denoted by encoded blocksize indication information 506. The input signal 505 is divided intorectangular blocks by a block dividing unit 40 based on the encodedblock size indication information 506. In the following description, theinput signal 505 corresponding to the color component Ci is sometimesreferred to as picture as the unit of data for the encoding process.

When the input video signal 1 is a signal represented in a color spaceof luminance/chrominance signals (for example, Y, Cb, and Cr, or Y, Co,and Cg, and the like), there is an encoding method of allocating theluminance component as the screen component 505 b 0 and the chrominancecomponents as the screen components 505 b 1 and 505 b 2 in the inputsignal 505. In this case, the luminance component is a signal componentin which the texture information contained in the image signal isconcentrated, whereas each of the chrominance signals is a signalcomponent, from which the correlation with the luminance componentassociated with the texture information is removed, to visually have therole of coloring a monochromic image. Therefore, in the signalprediction such as the inter-frame motion compensation prediction basedon the texture structure or the intra-frame spatial prediction asemployed in the AVC, the size of the block serving as the unit ofprediction is not necessarily required to be the same as that of theluminance component. On the contrary, for the chrominance signal, theprediction is not necessarily performed in the same block size as thatof the luminance component. It is believed that the prediction indifferent block sizes which allow the maximum use of the correlation ofthe chrominance signals in the screen can enhance the encodingefficiency. For example, when the component Y is C0, the component Cb isC1, and the component Cr is C2, the block size of each of thechrominance components is determined to be larger than that of theluminance component by setting M₀=16 and M₁=M₂=32. As a result, for twoof the three components, the overhead information (the prediction mode,the motion vector, and the like) for each unit of encoding can bereduced to about ¼ of that of the luminance component. This state isillustrated in FIG. 89.

The size M_(i) may be determined according to the image size. Forexample, in comparison between a video image of an HDTV signal (1920pixels×1080 lines) and a low-resolution video image of a CIF signal (352pixels×288 lines) having the same contents, a block of 4 pixels×4 linesof the HDTV signal has the size of only one pixel area in the CIFsignal. Therefore, as the image resolution becomes higher, a substantialimage texture area covered by each pixel is reduced. In the inter-framemotion compensation prediction or the intra-frame spatial prediction,similarity of the texture structure of the original image is detected touse a signal area having the highest similarity as a prediction value.Therefore, unless a certain degree of the texture structure is kept inthe signal in the block corresponding to the unit of prediction, theprediction is not successfully performed (prediction performance isinhibited by a noise component). Therefore, it is desirable that a largeblock size be determined for a high-resolution video image to cover thetexture area which is otherwise covered in the case of a low-resolutionvideo image. Thus, the size M_(i) can be increased as the image sizebecomes larger. Hereinafter, the rectangular area composed ofM_(i)×M_(i) pixels is referred to as macroblock.

For the input signal 505 divided into the macroblocks by the blockdividing unit 40, the intra prediction process for performing thespatial prediction from the local decoded neighboring pixels of thecurrent picture, which are stored in the memory 16 b, or the motioncompensation prediction process for each color component, using thereference image from the prediction reference image data for one frameor more, which is stored in the memory 16 b, is performed in theprediction unit 461. Since the process of the prediction unit 461 inthis sixteenth embodiment differs from that of the prediction unit 461of FIG. 74, the process will be described below.

1.1 Intra Prediction Process

The intra prediction process is performed in the prediction unit 461 foreach macroblock by using a reference image 701 stored in the memory 16b. The intra prediction has two modes. One is the intra N×N predictionmode for performing the spatial prediction using the neighboring pixelsfor each block composed of N pixels×N lines. The other is a macroblockunit intra prediction mode for performing the spatial prediction usingthe neighboring pixels for each macroblock illustrated in FIG. 89.

(a) Intra N×N Prediction Mode

After the macroblock is divided into blocks, each block being composedof N×N pixels, the spatial prediction is performed for each block. As ablock size N corresponding to the unit of the intra N×N prediction, thesize, which can be obtained by equally dividing the macroblock sizeM_(i), is selected. For example, for M_(i)=16, N is any one of 4 and 8,and for M_(i)=32, N is any one of 4, 8, and 16. As the prediction value,the pixels of the neighboring (upper left, upper, upper right, and left)blocks of a current picture, which have already been encoded andsubjected to the local decoding process to be stored in the memory 16 b,are used. As the prediction mode, for example, a plurality of modes asillustrated in FIG. 3 is prepared. As in the first embodiment of thepresent invention described above, FIG. 3 illustrate nine predictionmodes for N=4. Any one of the nine prediction modes is selected for each4×4 pixel block.

Intra4×4_pred_mode=0: use upper neighboring pixels as a predicted image

Intra4×4_pred_mode=1: use left neighboring pixels as a predicted image

Intra4×4_pred_mode=2: use an average value of eight neighboring pixelsas a predicted image

Intra4×4_pred_mode=3: calculate a weighted average of every two or threepixels from the neighboring pixels to use the obtained weighted averageas a predicted image (corresponding to a diagonal down-left edge at 45degrees)

Intra4×4_pred_mode=4: calculate a weighted average of every two or threepixels from the neighboring pixels to use the obtained weighted averageas a predicted image (corresponding to a diagonal down-right edge at 45degrees)

Intra4×4_pred_mode=5: calculate a weighted average of every two or threepixels from the neighboring pixels to use the obtained weighted averageas a predicted image (corresponding to a vertical right edge at 22.5degrees)

Intra4×4_pred_mode=6: calculate a weighted average of every two or threepixels from the neighboring pixels to use the obtained weighted averageas a predicted image (corresponding to a horizontal down edge at 67.5degrees)

Intra4×4_pred_mode=7: calculate a weighted average of every two or threepixels from the neighboring pixels to use the obtained weighted averageas a predicted image (corresponding to a vertical left edge at 22.5degrees)

Intra4×4_pred_mode=8: calculate a weighted average of every two or threepixels from the neighboring pixels to use the obtained weighted averageas a predicted image (corresponding to a horizontal up edge at 112.5degrees)

For N=4, sixteen pieces of mode information are required for eachmacroblock. In order to reduce the amount of codes of the modeinformation itself, prediction encoding is performed based on the modeinformation of the neighboring blocks, taking advantage of a highcorrelation in the mode information between the neighboring blocks.Although not illustrated, for N=8 or 16, the spatial prediction mode inconsideration of the directionality of the image texture as in the caseof N=4 is defined to perform the intra prediction process for each ofN×N sub-blocks obtained by equally dividing the M_(i)×M_(i) macroblock.

(b) Macroblock Unit Intra Prediction Mode

In this mode, the M_(i)×M_(i) pixel block corresponding to themacroblock size is predicted at a time. For M_(i)=16, any one of thefour modes illustrated in FIG. 4 is selected for each macroblock. As inthe case of the intra N×N prediction mode, the pixels of the neighboring(upper left, upper, and left) macroblocks, which have already beenencoded and subjected to the local decoding process to be stored in thememory 16 b, are used for generating the predicted image.

-   Intra 16×16_pred_mode=0: use sixteen pixels in the lowermost line of    the upper macroblock as a predicted image-   Intra 16×16_pred_mode=1: use sixteen pixels in the rightmost line of    the left macroblock as a predicted image-   Intra 16×16_pred_mode=2: use an average value of thirty-two pixels,    i.e., sixteen pixels (A of FIG. 4) in the lowermost line of the    upper macroblock and sixteen pixels (B of FIG. 4) in the leftmost    line in the left macroblock, as a predicted image-   Intra 16×16_pred_mode=3: use thirty-one pixels corresponding to a    pixel at the lower right corner in the upper left macroblock,    fifteen pixels in the lowermost line of the upper macroblock (except    for a white pixel), and fifteen pixels in the rightmost line of the    left macroblock (except for a white pixel) to perform a    predetermined computing process (weighted addition process according    to the used pixels and pixel positions to be predicted) to obtain    the predicted image-   Even if M_(i) is not 16, the macroblock unit spatial prediction mode    in consideration of the directionality of the image texture as in    the case of M_(i)=16 is defined.

As a prediction efficiency evaluation norm for selecting the intraprediction mode executed in the prediction unit 461, for example, arate-distortion cost given by:

Jm=Dm+λRm (λ: a positive number)

can be used. In this expression, Dm is an encoding distortion or aprediction error amount when an intra prediction mode m is used. Theencoding distortion is obtained by obtaining a prediction differencesignal using the intra prediction mode m, decoding a video image fromthe result of transform and quantization of the prediction differencesignal, and then measuring an error of the video image from a signalprior to encoding. The prediction error amount is obtained by obtaininga difference between a predicted image and a signal prior to encodingwhen the intra prediction mode m is used and then quantifying thedifference. For example, a sum of absolute distance (SAD) is used as theprediction error amount. Then, Rm is a generated code amount when theintra prediction mode m is used. Specifically, Jm is a value defining atradeoff between the amount of codes and the degree of deteriorationwhen the intra prediction mode m is used. The intra prediction mode mproviding the smallest Jm gives the optimal solution.

1.2 Motion Compensation Prediction Process

In the prediction unit 461, the inter-frame motion compensationprediction process is also performed for each of the macroblocks byusing the local decoded image 15 which has been encoded to be stored inthe memory 16 b. As the block size to be subjected to the motioncompensation prediction, as illustrated in FIGS. 90A to 90D, any one ofthe division types, that is, M_(i)×M_(i) pixels,M_(i)×(M_(i)/2),(M_(i)/2)×M_(i), and (M_(i)/2)×(M_(i)/2) can be selectedfor each macroblock. Further, for the selection of the size(M_(i)/2)×(M_(i)/2), any one of the sizes(M_(i)/2)×(M_(i)/2),(M_(i)/2)×(M_(i)/4),(M_(i)/4)×(M_(i)/2), and(M_(i)/4)×(M_(i)/4) can be further selected for each (M_(i)/2)×(M_(i)/2)block, as illustrated in FIGS. 90E to 90H.

Further, as illustrated in FIGS. 90I to 90L, an area obtained byunequally dividing the macroblock can be used as the motion compensationprediction unit. The image signal generally contains a subject having aprofile. In the vicinity of the profile, discontinuity in motionfrequently occurs. If only the macroblock or the rectangular blockcorresponding to a sub-set thereof serves as the unit of motiondetection, the prediction efficiency is disadvantageously prevented frombeing enhanced unless the block is further divided into smaller ones toincrease the number of motion vectors when the boundary of an object ispresent in the block to cause the discontinuity in motion. If the areaobtained by unequally dividing the macroblock as illustrated in FIGS.90I to 90L is prepared as a motion compensation prediction unit, thediscontinuity in motion on the object profile can be covered with areduced number of motion vectors to enhance the prediction efficiency.

Moreover, when a profile is present in the macroblock, the profile inthe macroblock can generally have various positions or shapes. In orderto define all the positions or shapes, not only the shapes asillustrated in FIGS. 90I to 90L but also every type of division of theblock are required to be defined. By limiting the unit area constitutingthe shape of unequal division “up to the block (M_(i)/2)×(M_(i)/2)” asillustrated in FIGS. 90I to 90L in the sixteenth embodiment of thepresent invention, the effects of holding down the amount of codes ofadditional information which is required to be encoded to represent thedivision pattern, holding down the amount of calculations required toperform the motion detection for each of the division patterns, andenhancing the efficiency of an access to the memory 16 b to generate theprediction value to hold down a memory band width are obtained.

The selection of the division pattern from those illustrated in FIGS.90A to 90H for the motion compensation prediction is determined as theinter prediction mode. The motion vectors allocated to the selecteddivision pattern are generated and output. For the types of the interprediction mode available for one picture, the inter prediction mode maybe defined to allow all the division patterns in FIGS. 90A to 90H to bedesignated, or the number of selectable division patterns as the interprediction mode may be limited according to the conditions to reduce theamount of calculations required for selecting the optimal interprediction mode or the amount of codes of the information fordesignating the inter prediction mode. For example, as the number ofdivisions of the macroblock is increased, the amount of information ofthe motion vectors, which is required to be encoded, also increases.Therefore, when the encoding is performed at a low bit rate, thepatterns for sub-division into the size of (M_(i)/2)×(M_(i)/2) pixels orsmaller as illustrated in FIGS. 90E to 90H are not used. Instead, thedivision patterns illustrated in FIGS. 90I to 90L, which require only asmaller amount of codes of the motion vectors, are selected. Forexample, the value of the quantization parameter can be used as acriterion for determining whether the bit rate is high or low.Therefore, the definition of the inter prediction mode can be switchedaccording to the value of an initial state of the quantization parameterfor encoding the picture. Alternatively, a dedicated identification bitfor determining the definition of the inter prediction mode may bemultiplexed in the bit stream.

Further, when the motion vector for each reference image has to beindividually encoded in a picture using a predicted image obtained froma plurality of reference images, as in the case of a B-picture in theMPEG-2 or a bidirectional prediction in the AVC, the patterns forsub-division into the size of (M_(i)/2)×(M_(i)/2) pixels or smaller asillustrated in FIGS. 90E to 90H are not used. Instead, in order toreduce the amount of information of the motion vectors, the divisionpatterns illustrated in FIGS. 90I to 90L, which require a smaller amountof codes of the motion vectors, may be selected. Besides, the definitionof the inter prediction mode may be switched based on the pre-estimationof motions in the entire screen or the information indicating theprocess of encoding of the picture, which has been encoded immediatelybefore. For example, in a scene containing complicated motions, thedefinition of the inter prediction mode is defined to allow the divisionpattern into blocks of the smaller size to be used. On the other hand,when a motion is uniform and therefore it is determined that asatisfactory prediction can be performed even in the units of largeblocks, the definition of the inter prediction mode which does not usethe division pattern into the smaller size is determined. Alternatively,the reference image used for generating a prediction value can bedesignated for each of the blocks obtained by dividing the macroblock toencode an identification number of the reference image.

As a prediction efficiency evaluation norm for selecting the interprediction mode executed in the motion compensation prediction process,for example, a rate-distortion cost given by:

Jm,v,r=Dm,v,r+λRm,v,r (X: a positive number)

can be used. In this expression, Dm,v,r is an encoding distortion or aprediction error amount when an inter prediction mode m, and a motionvector v and a reference image r determined according to the interprediction mode m are used. The encoding distortion is obtained byobtaining a prediction difference signal using the inter prediction modem, the motion vector v, and the reference image r, decoding a videoimage from the result of transform and quantization of the predictiondifference signal, and then measuring an error of the video image for asignal prior to encoding. The prediction error amount is obtained byobtaining a difference between a predicted image and a signal prior toencoding when the inter prediction mode m, the motion vector v, and thereference image r are used and then quantifying the difference. Forexample, a sum of absolute distance (SAD) is used as the predictionerror amount. Then, Rm,v,r is the amount of generated codes when theinter prediction mode m, the motion vector v, and the reference image rare used. Specifically, Jm,v,r is a value defining a tradeoff betweenthe amount of codes and the degree of deterioration when the interprediction mode m, the motion vector v, and the reference image r areused. The inter prediction mode m, the motion vector v, and thereference image r, which provide the smallest Jm,v,r, give the optimalsolution.

1.3 Picture Encoding Process

The prediction unit 461 executes the intra prediction process for allthe intra prediction modes illustrated in FIGS. 3 or 4 or the sub-setthereof to generate an intra prediction image for each macroblock. Theprediction unit 461 also executes the motion compensation predictionprocess for all the motion compensation prediction modes illustrated inFIGS. 90 and the sub-set thereof to output the predicted image 7 for theM_(i)×M_(i) block. The predicted image 7 is subtracted from the inputsignal 505 by the subtracter 3 to obtain the prediction differencesignal 4. The prediction efficiency of the prediction difference signal4 is evaluated in the encoding mode determining unit 5 to output theprediction mode, with which the optimal prediction efficiency isobtained for the macroblock to be predicted, from the prediction processexecuted in the prediction unit 461, as the encoding mode 6.Specifically, the encoding mode 6 contains information of the macroblocktype for identifying the use of the intra N×N prediction mode asillustrated in FIG. 3, the use of the macroblock unit intra predictionmode as illustrated in FIG. 4, or the division pattern selected from anyof the division patterns as illustrated in FIG. 90 used for the motioncompensation prediction. Moreover, in this sixteenth embodiment, thetype of the encoding mode selectable for the current picture is switchedbased on encoding mode definition selection information 711 determinedby the encoding control unit 19 or the like. As the encoding modedefinition selection information 711, dedicated selection indicationinformation may be used. Besides, without using dedicated information,for example, an initial value of the quantization parameter 21 forencoding the current picture or encoded block size indicationinformation 506 notified to the block dividing unit 40 may be used aloneor in combination. In selecting the encoding mode 6, the weightingcoefficient 20 for each of the encoding modes, which is determined bythe encoding control unit 19, is sometimes taken into consideration. Theoptimal prediction difference signal 4 obtained by using the encodingmode 6 in the encoding mode determining unit 5 is output to thetransform unit 310.

The transform unit 310 transforms the prediction difference signal 4composed of the input M_(i)×M_(i) pixel block to output the result oftransform as the transform coefficient to the quantization unit 9. Forthe transform, the M_(i)×M_(i) pixel block is divided into L×L pixelblocks (L<=M_(i) and M_(i) is a multiple of L). The transformation blocksize L is designated by a transformation block size indication flag 464.With such a configuration, the transform process adapted to the localproperty of the signal in the M_(i)×M_(i) pixel block can be performed.As the transformation block size L, the transform may be performed forall the settable values of L to select the value providing the highestefficiency. Alternatively, the transformation block size L may beselected to be the same as the block size in the intra prediction modeor the block size in the motion compensation prediction mode. In thelatter case, since the encoding mode 6 contains informationcorresponding to the transformation block size indication flag 464, theeffect of omitting the multiplexing of the transformation block sizeindication flag 464 in the bit stream is obtained. The quantization unit9 quantizes the input transform coefficient based on the quantizationparameter 21 determined by the encoding control unit 19 to output theresult of quantization as the quantized transform coefficient 10 to thevariable length encoding unit 11. The quantized transform coefficient 10is entropy-coded by means such as Huffman encoding or arithmetic codingin the variable length encoding unit 11. The quantized transformcoefficient 10 passes through the inverse quantization unit 12 and theinverse transform unit 312 to be restored to the local decodedprediction difference signal 14. The local decoded prediction differencesignal 14 is added to the predicted image 7 generated by the predictionmethod corresponding to the encoding mode 6 in the adder 18 to generatethe local decoded image 15. For the use of the local decoded image 15 inthe following prediction process, the distortion removal filter isapplied to a boundary between the blocks in the deblocking filter unit462 based on the deblocking filter control flag 24 indicating whether ornot the deblocking filter is to be applied. Alternatively, the localdecoded image 15 is stored in the memory 16 b without the application ofthe deblocking filter. The deblocking filter unit 462 refers to theencoded block size indication information 506 and the transformationblock size indication flag 464 to perform the optimal block distortionremoval process for each of the boundary between the macroblocks and theboundary between the transform blocks. Since the same process isrequired to be performed in the decoding device, the deblocking filtercontrol flag 24 is input to the variable length encoding unit 11 to bemultiplexed in the bit stream.

The encoded block size indication information 506 for defining themacroblock size M_(i), the quantized transform coefficient 10, theencoding mode 6, the prediction overhead information 463, and thequantization parameter 21 are entropy-coded by means such as Huffmanencoding or arithmetic coding in the variable length encoding unit 11 tobe arranged and shaped as a bit stream according to a predetermined rule(syntax). Then, the obtained bit stream is output to the transmissionbuffer 17. The prediction overhead information 463 in this sixteenthembodiment contains the prediction mode information (Intra4×4_pred_mode,Intra16×16_pred_mode or the like) used for each prediction unit blockwhen the intra prediction process is selected as the encoding mode 6. Onthe other hand, when the motion compensation prediction process isselected as the encoding mode 6, the overhead information 463 containsthe motion vector information or the reference image index according tothe division pattern defined for each of the macroblock typesillustrated in FIGS. 90A to 90H. The transmission buffer 17 smoothes thebit stream according to the band of a transmission path to which theencoding device is connected or the reading velocity of a recordingmedium to output the bit stream as the video stream 422 b 0. Thetransmission buffer 17 also outputs feedback information to the encodingcontrol unit 19 according to a state of accumulation of the bit streamsin the transmission buffer 17 to control the amount of codes to begenerated in the encoding of the subsequent video frames. The videostream 422 b 0 is unitized into slices, each being obtained by gatheringa plurality of macroblocks, and is then output.

2. Structure of the Encoded Bit Stream

By executing the above-mentioned process in the picture encoding unit503, the input video signal 1 to the encoding device is independentlyencoded in the three independent picture encoding units 503 b 0, 503 b1, and 503 b 2 to be output as video streams 422 b 0, 422 b 1, and 422 b2 in units of slices, each being obtained by gathering a plurality ofmacroblocks. Then, after the video streams 422 b 0, 422 b 1 and 422 b 2are arranged into the video stream 422 c in the multiplexing unit 504 asthe input video signal 1 composed of three components, the video stream422 c is output from the encoding device.

A data sequence of each of the video streams 422 b 0 to 422 b 2 eachoutput from the picture encoding units 503 b 0 to 503 b 2 is illustratedin FIG. 91. Each of the video streams 422 b 0 to 422 b 2 obtained by thepicture encoding units is constituted as the encoded data for the numberof the macroblocks contained in the picture.

-   A plurality of macroblocks are put into a slice corresponding to the    unit of data. A picture level header, which is referred to by the    macroblocks contained in the same picture as a common parameter, is    prepared. In the picture level header, the encoded block size    indication information 506 and encoding mode definition selection    information 711 are stored. For all the macroblocks contained in the    picture, the macroblock size Mi is determined based on the encoded    block size indication information 506 contained in the picture level    header which is referred to by the macroblocks. Then, the variable    length encoding procedure of the encoding mode 6 is determined    according to the encoding mode definition selection information 711.

Each slice begins with a slice header. The slice header contains a colorcomponent identification flag 721 for indicating the color component ofthe encoded data contained in the slice of interest (information fordefining any of the color components 505 b 0 to 505 b 2) (as in the caseof the slice encoded data obtained by the independent encoding processin FIG. 69). Subsequent to the slice header, the encoded data of each ofthe macroblocks in the slice is arranged (in this example, K macroblocksare contained in the second slice in one picture). As the data of eachmacroblock, the encoding mode 6, the prediction overhead information463, the transformation block size indication flag 464, the quantizationparameter 21 (only when the quantization parameter is changed for eachmacroblock), and the quantized transform coefficient 10 are arranged.The video stream 422 c output from the encoding device illustrated inFIG. 87 is obtained by multiplexing the video streams 422 b 0 to 422 b 2for three components, each having the structure illustrated in FIG. 91.The encoded block size indication information 506 and the encoding modedefinition selection information 711 are arranged in the picture levelheader in FIG. 91, but these information may be stored in a sequencelevel header which is provided for each sequence obtained by gathering aplurality of video frames for the information for three components. Inthis manner, information different for each of the three components isnot required to be encoded and transmitted with its own picture levelheader, and the amount of information of the header can be reduced.

3. Outline of Operation of the Decoding Device

The decoding device illustrated in FIG. 92 receives the video stream 422c output from the encoding device illustrated in FIG. 87 and performsthe decoding process on the macroblock basis to restore each videoframe.

In FIG. 92, the higher-order header information such as the sequencelevel header or the picture level header of the video stream 422 c isdecoded in the higher-order header analyzing unit 610 to be stored in apredetermined memory area which can be referred to by the colorcomponent determining unit 602 and the picture decoding units 603 b 0 to603 b 2.

The color component determining unit 602 identifies the color componentpicture to which the slice corresponds, based on the value of the colorcomponent identification flag 721 illustrated in FIG. 91 to distributeand feed the slice to an appropriate one of the picture decoding units(603 b 0 to 603 b 2). With such a configuration of the decoding device,even if the decoding device receives a video stream containing threecolor components, the decoding device can easily determine the colorcomponent picture, to which the slice belongs, to correctly decode thecolor component picture.

3.1 Outline of Operation of the Picture Decoding Units 603

Hereinafter, an operation of each of the picture decoding units 603 b 0to 603 b 2 will be described in detail. The description of the picturedecoding units 603 b 0 to 603 b 2 in the sixteenth embodiment will bemade as a variation of the configuration illustrated in FIG. 77. FIG. 93illustrates an internal configuration of each of the picture decodingunits 603 b 0 to 603 b 2. In FIG. 93, the functional blocks and thesignal lines denoted by the same reference numerals as those of thepicture decoding unit illustrated in FIG. 77 are the same as those inFIG. 77 unless otherwise noted.

Each of the picture decoding units 603 b 0 to 603 b 2 receives C0, C1,or C2 slice encoded data classified in the color component determiningunit 602 to perform the decoding process on the macroblock basis, eachmacroblock being composed of samples of a single color component, torestore a signal 427 b 0 (or 427 b 1 or 472 b 2) of the correspondingcolor component of the output video frame.

The variable length decoding unit 25 receives the input of the videostream 422 c and deciphers the video stream 422 c according to apredetermined rule (syntax) to extract the slice header, and thequantized transform coefficient 10, the prediction overheard information463, the transformation block size indication flag 464, the quantizationparameter 21, and the encoding mode 6 for each macroblock. The sequenceor picture level header is decoded in the higher-order header analyzingunit 610 in FIG. 92. In this case, the information such as the encodedblock size indication information 506 or the encoding mode definitionselection information 711 is made referable prior to the start of thedecoding of the slice in the picture decoding units 603 b 0 to 603 b 2for decoding the corresponding color component. When the sequence or thepicture level header is decoded in the variable length decoding unit 25in each of the picture decoding units 603 b 0 to 603 b 2, the picturelevel header is decoded in the variable length decoding unit 25 prior tothe start of the decoding of the slice to extract the information suchas the encoded block size indication information 506 or the encodingmode definition selection information 711 from the bit stream. Althoughnot illustrated, the encoding mode definition selection information 711is used to determine the variable length decoding procedure when theencoding mode 6 is decoded in the variable length decoding unit 25.

The quantized transform coefficient 10 is input together with thequantization parameter 21 to the inverse quantization unit 12 whichperforms the same process as that in each of the picture encoding units503 b 0 to 503 b 2 to be subjected to the inverse quantization process.Subsequently, an output from the inverse quantization unit 12 is inputto the inverse transform unit 312 which performs the same process asthat in each of the picture encoding units 503 b 0 to 503 b 2 to berestored to the local decoded prediction difference signal 14. Throughthe above-mentioned process, in order to constitute the transformationblock size designation flag 464 providing the transformation block sizeL serving as the unit of the inverse transform and the inversequantization and the inverse transform output as the prediction errorimage of the M_(i)×M_(i) pixel block, the encoded block size indicationinformation 506 is referred to. On the other hand, the prediction unit461 includes only the process of referring to the encoding mode 6 andthe prediction overhead information 463 to generate the predicted image7 of those performed in the prediction unit 461 in each of the pictureencoding units 503 b 0 to 503 b 2. The encoding mode 6 and theprediction overhead information 463 are input to the prediction unit 461to obtain the predicted image 7. The prediction unit 461 is notified ofthe encoded block size indication information 506 to generate thepredicted image for the M_(i)×M_(i) pixel block based on the macroblocksize M_(i).

When the encoding mode 6 indicates the intra prediction mode such as theintra N×N prediction or the macroblock unit intra prediction, thepredicted image 7 is obtained by using the intra prediction modeinformation for each N×N block or the intra prediction mode informationfor each macroblock, and the reference image 701 stored in the memory 16b according to the macroblock size M_(i) from the prediction overheadinformation 463. When the encoding mode 6 indicates the inter (motioncompensation) prediction, the division pattern of the macroblock isidentified from those in the FIGS. 90A to 90H based on the encoding mode6. Then, the predicted image 7 is obtained by using the reference image701 stored in the memory 16 b according to the motion vector, thereference image index, and the macroblock size M_(i) obtained from theprediction overhead information 463.

The local decoded prediction difference signal 14 and the predictedimage 7 are added by the adder 18 to obtain a decoded image 427 b 0 (or427 b 1 or 427 b 2). Since the decoded image 427 b 0 (or 427 b 1 or 427b 2) is used for the motion compensation prediction of the subsequentmacroblocks, the block distortion removal process may be performed inthe deblocking filter 26 based on the deblocking filter control flag 24as in the picture encoding units 503 b 0 to 503 b 2. In this case, sincethe result of the process of the deblocking filter 26 is stored in thememory 16 b to be referred to as the reference image 701 for thesubsequent picture decoding, the block distortion removal processadapted to each of the macroblocks and the transform blocks is performedby referring to the encoded block size indication information 506 andthe transformation block size designation flag 464 as in the case ofencoding. The decoded image 427 b 0 (or 427 b 1 or 427 b 2) is stored inthe memory 16 b to be used for the subsequent motion compensationprediction process. The decoded image 427 b 0 (or 427 b 1 or 427 b 2)contains only the samples of a single color component. The decodedimages 427 b 0, 427 b 1 and 427 b 2, which are respectively output fromthe picture decoding units 603 b 0 to 603 b 2 for decoding the othercolor components, are bundled into a video frame to constitute a colorvideo frame.

According to the above-mentioned encoding device and the decodingdevice, in order to efficiently encode the color video signal in the4:4:4 format, each of the color components can be independentlysubjected to the prediction encoding. In addition, the size of themacroblock to be predicted and encoded can be dynamically switchedaccording to the property of the signal of each of the color components.Therefore, the amount of codes of the prediction overhead information463 such as the intra prediction mode, the motion vector, or thereference image index, which has a high rate with respect to a totalamount of codes in low-bit rate encoding at a high compression ratio,can be efficiently held down in the encoding. Further, in the motioncompensation prediction process, the unequal division pattern is usedfor the macroblock for enhancing the prediction efficiency with areduced number of motion vectors to hold down the amount of codes of theprediction overhead information 463. As a result, the balance betweenthe prediction efficiency and the amount of codes is improved. At thesame time, the type of the inter prediction mode representing thedivision pattern is diversified to enhance the prediction efficiency forvarious motions. In addition, the type of required inter prediction modecan be switched according to the encoding conditions such as the bitrate or the image resolution. As a result, the encoding device which canefficiently encode the color video signal in the 4:4:4 format and thedecoding device corresponding to such an encoding device can beprovided.

Although the encoding device illustrated in FIG. 88 obtained by addingthe block dividing unit 40 to the encoding device illustrated in FIG. 74and the decoding device corresponding to such an encoding device havebeen described in the sixteenth embodiment, similar effects can beobtained also by using the encoding device obtained by adding the blockdividing unit 40 to the processing function for performing an individualand independent encoding process for each color component and thedecoding device corresponding thereto as described in other embodiments.By replacing the part for executing the individual encoding process inthe encoding device in FIG. 71 with the encoding device in FIG. 87 andthe part for executing the individual decoding process in the decodingdevice in FIG. 75 with the decoding device in FIG. 92, the encodingdevice which is more highly adaptive to and efficient for the encodingof the color video signal in the 4:4:4 format and the decoding devicecorresponding thereto can be provided.

Seventeenth Embodiment

In contrast to the encoding device and the decoding device in thesixteenth embodiment, the encoding device and the decoding device, whichdynamically switch motion vector detection accuracies for performing themotion compensation prediction process in the prediction unit, will bedescribed in the seventeenth embodiment.

In principle, the input signal 505 corresponding to a digital imagecontains only discrete pixel information generated by sampling(hereinafter, referred to as an integer pixel). A technique for creatinga virtual sample between the integer pixels by an interpolationoperation to use the obtained virtual sample as a prediction image iswidely employed. The technique is known to be advantageous in twopoints: improvement of a prediction accuracy by the increased number ofprediction candidates; and improvement of the prediction efficiency bythe reduced singularity of the prediction image by the filtering effectproduced by the interpolation operation. On the other hand, it should benoticed that the amount of codes of the motion vectors, which representthe amount of motion, also increases with the improvement of theaccuracy of the virtual sample because the accuracy of the motionvectors is also required to be increased.

In the encoding methods such as the MPEG-1 and the MPEG-2, a half-pixelprediction allowing the use of the accuracy of the virtual sample up toa half-pixel accuracy is employed. FIG. 94 illustrates a state wheresamples at a ½ pixel accuracy are created. FIG. 94 illustrates integerpixels A, B, C, and D, and virtual samples at a half-pixel accuracy, e,f, g, h, and i, which are created from the integer pixels A to D.

e=(A+B)//2

f=(C+D)//2

g=(A+C)//2

h=(B+D)//2

i=(A+B+C+D)//2

(where // indicates a rounding division)

In the MPEG-4 (ISO/IEC 14496-2), a ¼ pixel accuracy prediction using avirtual sample up to a ¼ pixel accuracy is employed. In the ¼ pixelaccuracy prediction, after creating the half-pixel samples, ¼ pixelaccuracy samples are created by using the obtained half-pixel samples.In order to prevent excessive smoothing for creating the half-pixelsamples, a filter having a large number of taps is designed to be usedto retain a frequency component of the original signal as much aspossible. For example, in the ¼ pixel accuracy prediction in the MPEG-4,a virtual sample a at the half-pixel accuracy, which serves to create avirtual sample at the ¼ pixel accuracy, is created by eight neighboringpixels in the following manner. The following Formula is applied only toa horizontal process. The virtual sample a at the half pixel accuracy,which is created to create the virtual sample at the ¼ pixel accuracy,and X components X₄ to X₄ corresponding the integer pixels in thefollowing Formula have the positional relation as illustrated in FIG.95.

a=(COE1*X1+COE2*X2+COE3*X3+COE4*X4+COE ⁻¹ *X ⁻¹ +COE ⁻² *X ⁻² +COE ⁻³ *X⁻³ +COE ⁻⁴ *X ⁻⁴)//256

(where COE_(k): a filter coefficient (the sum of coefficients is 256);and // indicates a rounding division)

-   In the AVC (ISO/IEC14496-10), a filter including six taps, [1, −5,    20, 20, −5, 1], is employed to create the virtual samples at the    half-pixel accuracy. Further, the virtual samples at the ¼ pixel    accuracy are created by the linear interpolation process similar to    that for creating the half-pixel samples in the MPEG-1 and the    MPEG-2 described above.

1. Operation of the Encoding Device

Even in the seventeenth embodiment, the half-pixel or ¼ pixel accuracycan be designated as the accuracy of the virtual sample in the motioncompensation prediction process. Based on this condition, the encodingdevice and the decoding device in the seventeenth embodiment areconfigured so that the accuracy of the virtual sample used for eachcolor component can be designated. FIG. 96 illustrates a configurationof each of the picture encoding units 503 b 0 to 503 b 2 in theseventeenth embodiment. The picture encoding units 503 b 0 to 503 b 2 inFIG. 96 differ from those illustrated in FIG. 88 only in the operationsof the prediction unit 461 and the variable length encoding unit 11.

The prediction unit 461 in the seventeenth embodiment receives virtualpixel accuracy indication information 800. Based on the receivedinformation 800, the prediction unit 461 determines the accuracy of thevirtual pixel, for which the motion vector detection is performed, toperform a process. Although not illustrated, the virtual pixel accuracyindication information 800 is configured to be individually designatedto the picture encoding units 503 b 0 to 503 b 2 which encode therespective color components for each color component Ci. When thevirtual pixel accuracy indication information 800 indicates a “motionvector detection at the ¼ pixel accuracy,” the prediction unit 461performs the motion vector detection while the samples at the ¼ pixelaccuracy are being created by linear interpolation after the creation ofthe half-pixel accuracy samples based on a multi-tap filter as in theMPEG-4 or the AVC. On the other hand, when the virtual pixel accuracyindication information 800 indicates only a “motion vector detection atthe half-pixel accuracy,” the motion vector detection is performed whilethe samples at the half-pixel accuracy are being created based on themulti-tap filter as in the MPEG-4 or the AVC described above or whilethe samples at the half-pixel accuracy are being created by the linearinterpolation as in the MPEG-1 and the MPEG-2 described above. Since thedecoding device is required to create the virtual samples in the samemanner to obtain the predicted image, the virtual pixel accuracyindication information 800 is multiplexed and output in the bit stream.The method of creating the half-pixel accuracy sample may involveperforming the process by a method determined in advance in the sameprocedure by the encoding device and the decoding device. Alternatively,a plurality of methods may be prepared and the selected method may bemultiplexed in the bit stream as virtual sample creating methodindication information 811 and transmitted to the decoding device. As amethod of setting the virtual pixel accuracy indication information 800,for example, for encoding in the color space as that of Y, Cb, and Cr,the following method is conceivable. The motion vector detection isperformed at a higher accuracy for the component Y which greatlyreflects the texture structure of the image with the virtual pixelaccuracy indication information 800 set to indicate the “motion vectordetection at the ¼ pixel accuracy,” whereas the virtual pixel accuracyindication information 800 is set to indicate “only the motion vectordetection at the half-pixel accuracy” for the chrominance components (Cband Cr) having a lower correlation with the texture structure than thecomponent Y signal. This method can be configured not only to change thevirtual pixel accuracy indicated for each color component but also toperform the motion detection at a higher accuracy by setting the virtualpixel accuracy indication information 800 to indicate the “motion vectordetection at the ¼ pixel accuracy” for all the components when all thecomponents preserve a certain degree of the texture structure of theimage. Therefore, the effect in that a flexible motion compensationprediction process according to the property of the signal of each ofthe color components can be performed for a signal in any color space isobtained.

The virtual pixel accuracy indication information 800 is transmitted tothe variable length encoding unit 11 to be used for identifying the unitof a value of the motion vector (contained in the prediction overheadinformation 463) detected in the prediction unit 461. In the variablelength encoding unit 1 1, the motion vector to be encoded is denoted byMv, and a prediction vector determined for the MV according to apredetermined prediction value determining procedure is denoted by PMV.As the PM, the already encoded value is used. The variable lengthencoding unit 11 encodes an MV−PMV value. In this case, when the virtualpixel accuracy indication information 800 indicates the “motion vectordetection at the ¼ pixel accuracy,” the unit of the value of MV is the ¼pixel. On the other hand, when the virtual pixel accuracy indicationinformation 800 indicates the “motion vector detection at the half-pixelaccuracy,” the unit of the value of Mv is the ½ pixel. The motion vectorregarding the ¼ pixel as one has a value range double to that in thecase where the half-pixel is regarded as one for both the horizontal andvertical components. Therefore, when only the samples at the ½ pixelaccuracy are used, by setting the unit of the value of Mv to thehalf-pixel, as compared with the case where the ¼ pixel is used as theunit of value of MV, the amount of information required for encoding theMV can be reduced.

By using the above-mentioned property, not only for a difference insignal property in a different color space, but also for performing ahigh compression encoding in which the ratio of the amount of codes ofthe prediction overhead information 463 such as the motion vector isincreased with respect to a total amount of codes, the virtual pixelaccuracy indication information 800 can be adjusted to perform theencoding with the amount of codes of the motion vector being held down.Since the virtual pixel accuracy indication information 800 can be setindependently for each color component, the control adaptive to thecondition of each color component in high compression can be performed.As a result, a more highly adaptive encoding process becomes possible.

2. Structure of the Encoded Bit Stream

FIG. 97 illustrates a data sequence of each of the video streams 422 b 0to 422 b 2 output from the encoding device illustrated in FIG. 96. Thestream sequence of FIG. 97 differs from that of FIG. 91 in that thevirtual pixel accuracy indication information 800 is multiplexed in thepicture level header. As a result, the decoding device that receives thebit stream becomes capable of recognizing the unit of the value of themotion vector contained in the prediction overhead information 463 foreach color component to decode the motion vector in the same manner asin the encoding device, and creating the predicted image. Moreover, forexample, when a plurality of methods for creating the samples at thehalf-pixel accuracy can be prepared as described above, the virtualsample creating method indication information 811 may be multiplexed inthe picture level header. Although the virtual pixel accuracy indicationinformation 800 and the virtual sample creating method indicationinformation 811 are multiplexed in the area of the pixel level header inFIG. 97, the information 800 and 811 for three color components may becollectively multiplexed in a higher-order header area than the sequencelevel header.

3. Operation of the Decoding Device

FIG. 98 illustrates the configuration of the decoding device (thepicture decoding unit 603 b 0, 603 b 1, or 603 b 2) in the seventeenthembodiment. The decoding device in FIG. 98 differs from the picturedecoding unit 603 b 0, 603 b 1, or 603 b 2 in FIG. 93 only in theoperations of the variable length decoding unit 25 and the predictionunit 461. The variable length decoding unit 25 decodes the video stream422 b 0, 422 b 1, or 422 b 2 illustrated in FIG. 97, extracts thevirtual pixel accuracy indication information 800 contained in thepicture level header from the video stream, and outputs the extractedvirtual pixel accuracy indication information 800 to the prediction unit461. When the value of the virtual pixel accuracy indication information800 indicates the “motion vector detection at the ¼ pixel accuracy,” theunit of the value of the motion vector contained in the predictionoverheard information 463 is set to the ¼ pixel. Then, the predictionoverhead information 463 is transmitted to the prediction unit 461.Based on the fact that the unit of the value of the motion vectorcontained in the prediction overhead information 463 is the ¼ pixel, theprediction unit 461 generates the predicted image while creating thesamples at the ¼ pixel accuracy by the linear interpolation after thecreation of the samples at the half-pixel accuracy based on themulti-tap filter as in the MPEG-4 or the AVC.

On the other hand, when the value of the virtual pixel accuracyindication information 800 indicates the “motion vector detection at thehalf-pixel accuracy,” the unit of the value of the motion vectorcontained in the prediction overheard information 463 is set to the ½pixel. Then, the prediction overhead information 463 is transmitted tothe prediction unit 461. Based on the fact that the unit of the value ofthe motion vector contained in the prediction overhead information 463is the half-pixel, the prediction unit 461 generates the predicted imagewhile creating the samples at the half-pixel accuracy based on themulti-tap filter as in the MPEG-4 or the AVC or the samples at thehalf-pixel accuracy by the linear interpolation as in the MPEG-1 or theMPEG-2 described above. In a configuration in which the plurality ofmethods of creating the half-pixel sample can be selected, the virtualsample creating method indication information 811 in FIG. 97 isextracted from the bit stream in the variable length decoding unit 25and is then transmitted to the prediction unit 461 so that thehalf-pixel sample is created by the same method as that in the encodingdevice.

According to the encoding device and the decoding device in theseventeenth embodiment described above, because, in order to efficientlyencode the color video signal in the 4:4:4 format, for the independentmotion compensation prediction for each color component, the accuracy ofthe virtual sample used for detecting the motion vector and creating thepredicted image can be dynamically switched according to the property ofthe signal of each color component, it is possible to perform theencoding with the amount of codes of the motion vector, the ratio ofwhich increases with respect to a total amount of codes in the low-bitrate encoding at a high compression ratio, being effectively suppressed.Further, by preparing a plurality of methods of creating the virtualsample, such as the types of interpolation filter used for creating thevirtual sample and selectively switching the methods to create thevirtual sample, the optimal motion compensation prediction processaccording to the property of the signal of each color component becomespossible. As a result, the encoding device which efficiently encodes thecolor video signal in the 4:4:4 format and the decoding devicecorresponding thereto can be provided.

In the seventeenth embodiment, the encoding device illustrated in FIG.96 obtained by adding the virtual pixel accuracy indication information800 to the encoding device illustrated in FIG. 88 in the sixteenthembodiment and the decoding device illustrated in FIG. 98 obtained byadding the virtual pixel accuracy indication information 800 to thedecoding device illustrated in FIG. 93 in the sixteenth embodiment havebeen described. However, also by using the encoding device obtained byadding the virtual pixel accuracy indication information 800 to theencoding device according to other embodiments and the decoding deviceobtained by adding the virtual pixel accuracy indication information 800to the decoding device according to the other embodiments, the similareffects can be obtained.

Eighteenth Embodiment

Another embodiment of the encoding device and the decoding device forperforming the individual and independent encoding process for encodingand decoding one color component independently of the other colorcomponents in the above-mentioned embodiments will be described in theeighteenth embodiment. Herein, the encoding device and the decodingdevice in the sixteenth embodiment are taken as an example. In theindividual and independent encoding process, the prediction overheadinformation 463 such as the encoding mode 6 and the motion vector, whichcannot be irreversibly encoded in principle, is multiplexed in the bitstream for each color component. Therefore, in the case of the encodingat a high compression ratio with the increased rate of the amount ofcodes with respect to a total amount of codes, compression performanceis impaired. Therefore, in the encoding device according to theeighteenth embodiment, information such as the encoding mode 6 or theprediction overhead information 463, which is obtained as a result ofthe encoding on the macroblock basis for a specific color component (forexample, determined as the C0 component), is retained as referenceinformation. When the macroblock present at the same position in theimage space as that of the macroblock of the C0 component using thereference information is to be encoded in the picture encoding unit 503for processing other color components, a selection can be made betweenthe encoding procedure which uses the reference information and theencoding procedure which individually determines the encoding mode 6 andthe prediction overhead information 463 for its own color component. Aprediction information encoding indication flag indicating the selectedprocedure is multiplexed for each macroblock. With such a configuration,when the color components have a high correlation regarding the encodingmode 6 or the prediction overhead information 463, the amount of codescan be effectively reduced to enhance the compression efficiency.

When the encoding mode 6 and the prediction overhead information 463 aredetermined independently for its own color component for the encoding,the encoding/decoding process procedure same as that described in thesixteenth and seventeenth embodiments can be used. Moreover, also in thecase where the encoding is performed by referring to the referenceinformation, almost the same encoding process procedure as thatdescribed in the sixteenth and seventeenth embodiments can be used bymerely skipping the multiplexing process of the encoding mode 6, theprediction overhead information 463, and the like in the bit streamalthough the encoding process for the other components is made to waiton the encoding side until the reference information is obtained. Alsoon the decoding side, the reference information is required to be firstdecoded. However, the same decoding process procedure as that describedin the sixteenth and seventeenth embodiments can be used by merelyperforming the process of determining whether to use the referenceinformation by decoding the prediction information encoding indicationflag or the decoded information in its own macroblock.

Further, by determining whether or not the prediction informationencoding indication flag is always multiplexed for each macroblock inthe higher-order data layer (the slice, the picture, or the sequence)and multiplexing in the bit stream, it is only sufficient to multiplexthe prediction information encoding indication flag as a code at themacroblock level only when needed, for example, only for the highcompression. Accordingly, the encoding efficiency can be enhanced.Moreover, without limiting the reference information to information of aspecific color component, the encoding and the decoding may be performedwhile selecting any of the color components to be used as a reference.

The configuration of the eighteenth embodiment is not limited to that ofthe sixteenth embodiment and is also applicable to all the encodingdevices and the decoding devices which perform the individual andindependent encoding process for encoding and decoding one colorcomponent independently of the other color components in the embodimentsof the present application.

1. An image decoding device for receiving a bit stream obtained bycompression-encoding a color moving image signal composed of a pluralityof color components as an input and using motion compensation predictiondecoding for each of the plurality of color components of the colormoving image signal to decode the color moving image signal, comprising:a color component identifying unit for decoding a color componentidentification flag for identifying the color component to which theinput bit stream belongs to determine the color component whose encodedinformation is contained in the bit stream; a decoding unit fordecoding, from the bit stream, virtual pixel accuracy indicationinformation indicating an upper accuracy limit of a virtual pixel usedfor generating a predicted image for each color component determined bythe color component identifying unit and decoding information obtainedby encoding a motion compensation prediction mode indicating a motioncompensation prediction image generating method used for encoding anencoding unit area, a corresponding motion vector, and a predictionerror from the bit stream according to a predetermined syntax for eachencoding unit area; a predicted image generating unit for generating apredicted image for a signal of the encoding unit area based on thevirtual pixel accuracy indication information, the motion compensationprediction mode, and the motion vector; a prediction error decoding unitfor decoding a prediction error signal based on the information obtainedby encoding the prediction error for the encoding unit area; and anadder unit for adding an output from the predicted image generating unitand an output from the prediction error decoding unit, wherein thedecoding unit performs a decoding process of the motion vector based onthe virtual pixel accuracy indication information.